I have just created a brand new Angular project using npx @angular/cli@13 new Ubisoft.SupplierPortalNext.Spa
and npm install
reports:
npm WARN [email protected] requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.
This is confirmed by npm ls --depth 0
:
npm ERR! peer dep missing: ajv@^6.9.1, required by [email protected]
npm ERR! peer dep missing: ajv@^6.9.1, required by [email protected]
npm ERR! peer dep missing: ajv@^6.9.1, required by [email protected]
I do not mind living with this warning, but I do not want to bite me later, so I am trying to solve it if possible. This package is used by various other packages (npm ls ajv-keywords
):
`-- @angular-devkit/[email protected]
+-- [email protected]
| `-- [email protected]
| `-- [email protected]
+-- [email protected]
| `-- [email protected]
| `-- [email protected]
+-- [email protected]
| `-- [email protected]
| `-- [email protected]
+-- [email protected]
| +-- [email protected]
| | `-- [email protected] deduped
| `-- [email protected]
| `-- [email protected]
| `-- [email protected] deduped
+-- [email protected]
| `-- [email protected]
| `-- [email protected]
`-- [email protected]
`-- [email protected]
`-- [email protected]
Both default ng serve
and ng serve
with a "localprod" configuration (AOT build served locally to check that the build actually works) work as expected with the default project.
I have installed ajv@^6.9.1
as requested, but now another major version is required:
npm WARN [email protected] requires a peer of ajv@^8.8.2 but none is installed. You must install peer dependencies yourself.
Also, ng serve
breaks:
An unhandled exception occurred: Cannot find module 'ajv/dist/compile/codegen'
Require stack:
- <myproject>\node_modules\webpack-dev-server\node_modules\ajv-keywords\dist\definitions\typeof.js
- <myproject>\node_modules\webpack-dev-server\node_modules\ajv-keywords\dist\keywords\typeof.js
- <myproject>\node_modules\webpack-dev-server\node_modules\ajv-keywords\dist\keywords\index.js
- <myproject>\node_modules\webpack-dev-server\node_modules\ajv-keywords\dist\index.js
- <myproject>\node_modules\webpack-dev-server\node_modules\schema-utils\dist\validate.js
- <myproject>\node_modules\webpack-dev-server\node_modules\schema-utils\dist\index.js
- <myproject>\node_modules\webpack-dev-server\lib\Server.js
- <myproject>\node_modules\@angular-devkit\build-webpack\src\webpack-dev-server\index.js
- <myproject>\node_modules\@angular-devkit\build-webpack\src\index.js
- <myproject>\node_modules\@angular-devkit\build-angular\src\builders\dev-server\index.js
- <myproject>\node_modules\@angular-devkit\architect\node\node-modules-architect-host.js
- <myproject>\node_modules\@angular-devkit\architect\node\index.js
- <myproject>\node_modules\@angular\cli\models\architect-command.js
- <myproject>\node_modules\@angular\cli\commands\serve-impl.js
- <myproject>\node_modules\@angular-devkit\schematics\tools\export-ref.js
- <myproject>\node_modules\@angular-devkit\schematics\tools\index.js
- <myproject>\node_modules\@angular\cli\utilities\json-schema.js
- <myproject>\node_modules\@angular\cli\models\command-runner.js
- <myproject>\node_modules\@angular\cli\lib\cli\index.js
- <myproject>\node_modules\@angular\cli\lib\init.js
Any idea about how to solve this issue? Or can I just let it be since ng serve and build work correctly?