ngc-webpack icon indicating copy to clipboard operation
ngc-webpack copied to clipboard

Error: The "@ngtools/webpack" package installed is not compatible with this version of "ngc-webpack"

Open EdIzotov opened this issue 6 years ago • 9 comments

Hi, I get the error: "Error: The "@ngtools/webpack" package installed is not compatible with this version of "ngc-webpack""

"devDependencies": { "@angular/compiler-cli": "^7.0.1", "@ngtools/webpack": "^7.0.3", "ngc-webpack": "^4.1.2" }

What is the issue? Thank you in advance! Tell me, pls, if it needs to provide any additional info.

EdIzotov avatar Oct 29 '18 13:10 EdIzotov

Try to set it in the resolutions field of package.json, so any dependencies that also require @ngtools/webpack use the exact same version.

actra-gschuster avatar Nov 06 '18 09:11 actra-gschuster

Hi @Edlzotov, Were you able to fix this issue?

Thanks

ashishdhyani avatar Jan 15 '19 07:01 ashishdhyani

I am experiencing the same issue, not sure how to even approach this, deleted my node modules, moved around dependencies but it's still acting up for me as well. This happens when I try to run webpack. Here is relevant dependencies from package.json

"dependencies": { "@angular/compiler-cli": "^6.1.10" }

"devDependencies": { "@ngtools/webpack": "^7.2.3", "ngc-webpack": "^4.1.2" }

here is my implementation within webpack.config.js

new ngcWebpack.NgcWebpackPlugin({ //AOT commented but does not work uncommented either //AOT: true, tsConfigPath: './tsconfig.json', mainPath: 'src/main.ts' })

And here is the entire error displayed on the integrated terminal of VSCode:

Error: The "@ngtools/webpack" package installed is not compatible with this version of "ngc-webpack" at NgcWebpackPlugin.createAngularCompilerPluginExecutionHost [as executionHostFactory] (/Users/adcbqq6/common-ui-lib/node_modules/ngc-webpack/src/plugin.js:9:15) at NgcWebpackPlugin.apply (/Users/adcbqq6/common-ui-lib/node_modules/ngc-webpack/src/plugin.js:67:34) at webpack (/Users/adcbqq6/common-ui-lib/node_modules/webpack/lib/webpack.js:47:13) at processOptions (/Users/adcbqq6/common-ui-lib/node_modules/webpack-cli/bin/cli.js:417:16) at yargs.parse (/Users/adcbqq6/common-ui-lib/node_modules/webpack-cli/bin/cli.js:498:3) at Object.parse (/Users/adcbqq6/common-ui-lib/node_modules/webpack-cli/node_modules/yargs/yargs.js:567:18) at /Users/adcbqq6/common-ui-lib/node_modules/webpack-cli/bin/cli.js:210:8 at Object. (/Users/adcbqq6/common-ui-lib/node_modules/webpack-cli/bin/cli.js:500:3) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Module.require (module.js:597:17) at require (internal/module.js:11:18) at Object. (/Users/adcbqq6/common-ui-lib/node_modules/webpack/bin/webpack.js:155:2) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Function.Module.runMain (module.js:694:10) at startup (bootstrap_node.js:204:16) at bootstrap_node.js:625:3

Please help!!!!

CarlosValencia78 avatar Jan 24 '19 17:01 CarlosValencia78

Try to set it in the resolutions field of package.json, so any dependencies that also require @ngtools/webpack use the exact same version. "resolutions": { "@ngtools/webpack": "7.2.3" }

actra-gschuster avatar Feb 01 '19 13:02 actra-gschuster

@actra-gschuster it doesn't work

mukulstan avatar Feb 04 '19 05:02 mukulstan

I am also getting the same error. "ngc-webpack": "^4.1.2", "@ngtools/webpack": "^7.2.3", Which version of @ngtools/webpack should we install?

vishu3011 avatar Feb 13 '19 07:02 vishu3011

"@ngtools/webpack": "^8.3.19", "ngc-webpack": "^4.1.2",

khteh avatar Nov 25 '19 06:11 khteh

It has been one year since the original issue post. Anyone working on resolving the issue?

khteh avatar Nov 25 '19 06:11 khteh

Hi guys.

This repo is no longer in active development.

It was created to bridge the gap that existed when the angular CLI was in early stages.

Today, you can easily accomplish everything that this plugin offers, using the CLI alone.

Additionally, for package authors there's the ng-packger.

I strongly suggest that you move to the officially supported solutions that are officially maintained by angular.

shlomiassaf avatar Nov 25 '19 12:11 shlomiassaf