-
Notifications
You must be signed in to change notification settings - Fork 12k
Webpack Plugin fails to import on Node 4 #6608
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
Comments
@trickeyone Angular CLI requires minimum node 6 or higher https://github.com/angular/angular-cli#prerequisites |
Hi @sumitarora. Yes, I see that in the root project's requirements, however the |
Solved : you need to go to Tools/Options/Projects and Solutions/Web Package Management/External Web Tools and add C:\Program Files\nodejs to the locations of external tools. Then make sure it is at the top of the list. |
@trilokchandra I'm on a Mac, not PC. I will follow-up that we have since moved to node v6. The main issue is that the required version of node was still set to v4 in the package.json for @ngtools/webpack . Updating the requirement should help keep anyone who is still on node < v6 from installing and getting errors. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Versions.
node: v4.8.3
npm: 5.0.3
Repro steps.
Just attempting to import the plugin using node v4 causes the error.
The log given by the failure.
I tracked the change that's causing the issue to commit #507b39984ad71eab48bec1f933492acb653e90df
The package.json is indicating that this version is compatible with node >= 4.1.0
Desired functionality.
I tried changing the line to
const __NGTOOLS_PRIVATE_API_2 = require('@angular/compiler-cli').__NGTOOLS_PRIVATE_API_2;
but there were other instances:const { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);
_translateSourceMap(sourceText, fileName, { line, character }) {
let { line, character, fileName } = this._translateSourceMap(sourceText, diagnostic.file.fileName, position);
const { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);
Of which I started running into it in src/refactor.js and I couldn't keep tracking.
Mention any other details that might be useful.
I would rather not use a beta version, but it looks like that was the last time node 4 was actually supported.
The text was updated successfully, but these errors were encountered: