shlomiassaf / ngc-webpack

Angular compiler-cli with webpack's loader chain.
MIT License
84 stars 15 forks source link

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

Open EdIzotov opened 6 years ago

EdIzotov commented 6 years ago

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.

actra-gschuster commented 6 years ago

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

ashishdhyani commented 5 years ago

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

Thanks

CarlosValencia78 commented 5 years ago

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!!!!

actra-gschuster commented 5 years ago

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" }

mukulstan commented 5 years ago

@actra-gschuster it doesn't work

vishu3011 commented 5 years ago

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?

khteh commented 4 years ago

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

khteh commented 4 years ago

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

shlomiassaf commented 4 years ago

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.