npm install (postinstall) fails
See original GitHub issueCurrently both develop and master won’t build (on my machine). npm install fails with the following output:
$ npm install
> intershop-pwa@0.27.0 postinstall
> postinstall && npm --silent run build:tslint-rules && npm --silent run build:schematics && npm run synchronize-lazy-components && node scripts/init-local-environment
../node_modules/codelyzer/angular/ngWalker.d.ts:19:5 - error TS2416: Property 'visitClassDeclaration' in type 'NgWalker' is not assignable to the same property in base type 'RuleWalker'.
Type '(declaration: ClassDeclaration) => void' is not assignable to type '(node: ClassDeclaration) => void'.
Types of parameters 'declaration' and 'node' are incompatible.
Type 'import("/tmp/intershop-pwa/tslint-rules/node_modules/typescript/lib/typescript").ClassDeclaration' is not assignable to type 'import("/tmp/intershop-pwa/node_modules/typescript/lib/typescript").ClassDeclaration'.
Types of property 'kind' are incompatible.
Type 'import("/tmp/intershop-pwa/tslint-rules/node_modules/typescript/lib/typescript").SyntaxKind.ClassDeclaration' is not assignable to type 'import("/tmp/intershop-pwa/node_modules/typescript/lib/typescript").SyntaxKind.ClassDeclaration'.
19 visitClassDeclaration(declaration: ts.ClassDeclaration): void;
~~~~~~~~~~~~~~~~~~~~~
../node_modules/codelyzer/angular/ngWalker.d.ts:20:5 - error TS2416: Property 'visitMethodDeclaration' in type 'NgWalker' is not assignable to the same property in base type 'RuleWalker'.
Type '(method: MethodDeclaration) => void' is not assignable to type '(node: MethodDeclaration) => void'.
Types of parameters 'method' and 'node' are incompatible.
Type 'import("/tmp/intershop-pwa/tslint-rules/node_modules/typescript/lib/typescript").MethodDeclaration' is not assignable to type 'import("/tmp/intershop-pwa/node_modules/typescript/lib/typescript").MethodDeclaration'.
Types of property 'kind' are incompatible.
Type 'import("/tmp/intershop-pwa/tslint-rules/node_modules/typescript/lib/typescript").SyntaxKind.MethodDeclaration' is not assignable to type 'import("/tmp/intershop-pwa/node_modules/typescript/lib/typescript").SyntaxKind.MethodDeclaration'.
20 visitMethodDeclaration(method: ts.MethodDeclaration): void;
~~~~~~~~~~~~~~~~~~~~~~
../node_modules/codelyzer/angular/ngWalker.d.ts:21:5 - error TS2416: Property 'visitPropertyDeclaration' in type 'NgWalker' is not assignable to the same property in base type 'RuleWalker'.
Type '(prop: PropertyDeclaration) => void' is not assignable to type '(node: PropertyDeclaration) => void'.
Types of parameters 'prop' and 'node' are incompatible.
Type 'import("/tmp/intershop-pwa/tslint-rules/node_modules/typescript/lib/typescript").PropertyDeclaration' is not assignable to type 'import("/tmp/intershop-pwa/node_modules/typescript/lib/typescript").PropertyDeclaration'.
Types of property 'kind' are incompatible.
Type 'import("/tmp/intershop-pwa/tslint-rules/node_modules/typescript/lib/typescript").SyntaxKind.PropertyDeclaration' is not assignable to type 'import("/tmp/intershop-pwa/node_modules/typescript/lib/typescript").SyntaxKind.PropertyDeclaration'.
21 visitPropertyDeclaration(prop: ts.PropertyDeclaration): void;
~~~~~~~~~~~~~~~~~~~~~~~~
src/noAssignementToInputsRule.ts:10:11 - error TS2345: Argument of type 'import("/tmp/intershop-pwa/tslint-rules/node_modules/typescript/lib/typescript").SourceFile' is not assignable to parameter of type 'import("/tmp/intershop-pwa/node_modules/typescript/lib/typescript").SourceFile'.
Types of property 'kind' are incompatible.
Type 'import("/tmp/intershop-pwa/tslint-rules/node_modules/typescript/lib/typescript").SyntaxKind.SourceFile' is not assignable to type 'import("/tmp/intershop-pwa/node_modules/typescript/lib/typescript").SyntaxKind.SourceFile'.
10 super(sourceFile, options);
~~~~~~~~~~
src/noAssignementToInputsRule.ts:18:3 - error TS2416: Property 'visitPropertyDecorator' in type 'NoAssignementToInputsWalker' is not assignable to the same property in base type 'NgWalker'.
Type '(decorator: import("/tmp/intershop-pwa/tslint-rules/node_modules/typescript/lib/typescript").Decorator) => void' is not assignable to type '(decorator: import("/tmp/intershop-pwa/node_modules/typescript/lib/typescript").Decorator) => void'.
Types of parameters 'decorator' and 'decorator' are incompatible.
Type 'import("/tmp/intershop-pwa/node_modules/typescript/lib/typescript").Decorator' is not assignable to type 'import("/tmp/intershop-pwa/tslint-rules/node_modules/typescript/lib/typescript").Decorator'.
Types of property 'kind' are incompatible.
Type 'import("/tmp/intershop-pwa/node_modules/typescript/lib/typescript").SyntaxKind.Decorator' is not assignable to type 'import("/tmp/intershop-pwa/tslint-rules/node_modules/typescript/lib/typescript").SyntaxKind.Decorator'.
18 visitPropertyDecorator(decorator: ts.Decorator) {
~~~~~~~~~~~~~~~~~~~~~~
src/noAssignementToInputsRule.ts:19:34 - error TS2345: Argument of type 'import("/tmp/intershop-pwa/tslint-rules/node_modules/typescript/lib/typescript").Decorator' is not assignable to parameter of type 'import("/tmp/intershop-pwa/node_modules/typescript/lib/typescript").Decorator'.
Types of property 'kind' are incompatible.
Type 'import("/tmp/intershop-pwa/tslint-rules/node_modules/typescript/lib/typescript").SyntaxKind.Decorator' is not assignable to type 'import("/tmp/intershop-pwa/node_modules/typescript/lib/typescript").SyntaxKind.Decorator'.
19 super.visitPropertyDecorator(decorator);
~~~~~~~~~
src/privateDestroyFieldRule.ts:8:3 - error TS2416: Property 'visitClassDecorator' in type 'PrivateDestroyFieldWalker' is not assignable to the same property in base type 'NgWalker'.
Type '(decorator: import("/tmp/intershop-pwa/tslint-rules/node_modules/typescript/lib/typescript").Decorator) => void' is not assignable to type '(decorator: import("/tmp/intershop-pwa/node_modules/typescript/lib/typescript").Decorator) => void'.
Types of parameters 'decorator' and 'decorator' are incompatible.
Type 'import("/tmp/intershop-pwa/node_modules/typescript/lib/typescript").Decorator' is not assignable to type 'import("/tmp/intershop-pwa/tslint-rules/node_modules/typescript/lib/typescript").Decorator'.
8 visitClassDecorator(decorator: ts.Decorator) {
~~~~~~~~~~~~~~~~~~~
src/privateDestroyFieldRule.ts:14:3 - error TS2416: Property 'visitPropertyDeclaration' in type 'PrivateDestroyFieldWalker' is not assignable to the same property in base type 'NgWalker'.
Type '(prop: import("/tmp/intershop-pwa/tslint-rules/node_modules/typescript/lib/typescript").PropertyDeclaration) => void' is not assignable to type '(prop: import("/tmp/intershop-pwa/node_modules/typescript/lib/typescript").PropertyDeclaration) => void'.
Types of parameters 'prop' and 'prop' are incompatible.
Type 'import("/tmp/intershop-pwa/node_modules/typescript/lib/typescript").PropertyDeclaration' is not assignable to type 'import("/tmp/intershop-pwa/tslint-rules/node_modules/typescript/lib/typescript").PropertyDeclaration'.
Types of property 'kind' are incompatible.
Type 'import("/tmp/intershop-pwa/node_modules/typescript/lib/typescript").SyntaxKind.PropertyDeclaration' is not assignable to type 'import("/tmp/intershop-pwa/tslint-rules/node_modules/typescript/lib/typescript").SyntaxKind.PropertyDeclaration'.
14 visitPropertyDeclaration(prop: ts.PropertyDeclaration) {
~~~~~~~~~~~~~~~~~~~~~~~~
src/privateDestroyFieldRule.ts:35:63 - error TS2345: Argument of type 'import("/tmp/intershop-pwa/tslint-rules/node_modules/typescript/lib/typescript").SourceFile' is not assignable to parameter of type 'import("/tmp/intershop-pwa/node_modules/typescript/lib/typescript").SourceFile'.
35 return this.applyWithWalker(new PrivateDestroyFieldWalker(sourceFile, this.getOptions()));
~~~~~~~~~~
src/useComponentChangeDetectionRule.ts:9:11 - error TS2345: Argument of type 'import("/tmp/intershop-pwa/tslint-rules/node_modules/typescript/lib/typescript").SourceFile' is not assignable to parameter of type 'import("/tmp/intershop-pwa/node_modules/typescript/lib/typescript").SourceFile'.
9 super(sourceFile, options);
~~~~~~~~~~
src/useComponentChangeDetectionRule.ts:12:3 - error TS2416: Property 'visitClassDecorator' in type 'UseComponentChangeDetectionWalker' is not assignable to the same property in base type 'NgWalker'.
Type '(decorator: import("/tmp/intershop-pwa/tslint-rules/node_modules/typescript/lib/typescript").Decorator) => void' is not assignable to type '(decorator: import("/tmp/intershop-pwa/node_modules/typescript/lib/typescript").Decorator) => void'.
Types of parameters 'decorator' and 'decorator' are incompatible.
Type 'import("/tmp/intershop-pwa/node_modules/typescript/lib/typescript").Decorator' is not assignable to type 'import("/tmp/intershop-pwa/tslint-rules/node_modules/typescript/lib/typescript").Decorator'.
12 visitClassDecorator(decorator: ts.Decorator) {
~~~~~~~~~~~~~~~~~~~
Found 11 errors.
npm ERR! code 2
npm ERR! path /tmp/intershop-pwa
npm ERR! command failed
npm ERR! command sh -c postinstall && npm --silent run build:tslint-rules && npm --silent run build:schematics && npm run synchronize-lazy-components && node scripts/init-local-environment
npm ERR! A complete log of this run can be found in:
npm ERR! /home/jdewit/.npm/_logs/2021-02-17T08_07_59_158Z-debug.log
Steps to Reproduce the Bug
Steps to reproduce the behavior:
- Checkout the project
- run npm install
- See error
Environment Details
-
Desktop: *
- OS: Ubuntu 20.10
- intershop pwa develop
- node 14.15.1
- npm 7.5.4
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
Issues in npm post-install script - Stack Overflow
Everytime i try to install npm in project directory it shows following error. Running npm-postinstall. js child_process. js:669 throw err; ^ ...
Read more >postinstall script fails when running `npm install` - Drupal
Failed at the barebones@1.0.0 postinstall script. Removing the "postinstall": "find node_modules/ -name '*. info' -type f -delete" step from ...
Read more >[v0.4.6] npm install fails because of postinstall script #129
Failed at the uglifyjs-webpack-plugin@0.4.6 postinstall script 'node lib/post_install.js'. npm ERR! Make sure you have the latest version of ...
Read more >postinstall - npm
Start using postinstall in your project by running `npm i postinstall`. ... Depend on this package: npm install postinstall --save.
Read more >Npm install core js postinstall sh: 1: node: Permission denied
In one of my react js project on doing npm install i got the following error , eventhough I was running as root...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, confirm. I shouldn’t always upgrade npm when suggested. Thanks.
No problem 😃