I am getthing this issue. I can't even build the Angular template using Dot Net Core/Standard 2.0
I just downloaded the Dotnet core 2.0 and VS 2017 15.3 and followed the wizard to just say hello world. I downloaded all the package needed from NPM source.
1>------ Rebuild All started: Project: AngularApplication2, Configuration: Debug Any CPU ------
1>AngularApplication2 -> c:\users\wil\documents\visual studio 2017\Projects\AngularApplication2\bin\Debug\netcoreapp2.0\AngularApplication2.dll
1>v4.6.0
1>Performing first-run Webpack build...
1>Hash: 803ac2b1a73d67da6627538031cacab98fa900ef
1>Version: webpack 2.5.1
1>Child
1> Hash: 803ac2b1a73d67da6627
1> Time: 5931ms
1> Asset Size Chunks Chunk Names
1> 89889688147bd7575d6327160d64e760.svg 109 kB [emitted]
1> vendor.js 3.26 MB 0 [emitted] [big] vendor
1> vendor.css 315 kB 0 [emitted] [big] vendor
1>Child
1> Hash: 538031cacab98fa900ef
1> Time: 5908ms
1> Asset Size Chunks Chunk Names
1> 89889688147bd7575d6327160d64e760.svg 109 kB [emitted]
1> vendor.js 3.43 MB 0 [emitted] [big] vendor
1>c:\users\wil\documents\visual studio 2017\Projects\AngularApplication2\node_modules\@ngtools\webpack\src\plugin.js:8
1>const { __NGTOOLS_PRIVATE_API_2 } = require('@angular/compiler-cli');
1> ^
1>
1>SyntaxError: Unexpected token {
1> at exports.runInThisContext (vm.js:53:16)
1> at Module._compile (module.js:373:25)
1> at Object.Module._extensions..js (module.js:416:10)
1> at Module.load (module.js:343:32)
1> at Function.Module._load (module.js:300:12)
1> at Module.require (module.js:353:17)
1> at require (internal/module.js:12:17)
1> at Object.<anonymous> (c:\users\wil\documents\visual studio 2017\Projects\AngularApplication2\node_modules\@ngtools\webpack\src\index.js:30:10)
1> at Module._compile (module.js:409:26)
1> at Object.Module._extensions..js (module.js:416:10)
1>c:\users\wil\documents\visual studio 2017\Projects\AngularApplication2\AngularApplication2.csproj(34,5): error MSB3073: The command "node node_modules/webpack/bin/webpack.js" exited with code 1.
1>Done building project "AngularApplication2.csproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
Its a issue with NodeJs Environment Variable,
Please install latest Node js from Official Website will resolve this environment variable setting problem and matches with same values as in latest Visual Studio.
Please rebuild your angular core project will resolve this issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With