Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
EdIzotov opened this issue Oct 29, 2018 · 9 comments

Comments

@EdIzotov
Copy link

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
Copy link

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
Copy link

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

Thanks

@CarlosValencia78
Copy link

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
Copy link

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
Copy link

@actra-gschuster it doesn't work

@vishu3011
Copy link

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
Copy link

khteh commented Nov 25, 2019

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

@khteh
Copy link

khteh commented Nov 25, 2019

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

@shlomiassaf
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants