gpt4 book ai didi

Angular Dot Net Core 2.0 构建问题

转载 作者:太空狗 更新时间:2023-10-29 18:04:18 25 4
gpt4 key购买 nike

我正在解决这个问题。我什至无法使用 Dot Net Core/Standard 2.0 构建 Angular 模板

我刚刚下载了 Dotnet 核心 2.0 和 VS 2017 15.3,然后按照向导只说了句 hello world。我从 NPM 源下载了所有需要的包。

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

最佳答案

这是 NodeJs 环境变量的问题,

请从 Official Website 安装最新的 Node js将解决此环境变量设置问题并匹配与最新 Visual Studio 中相同的值。

请重建您的 Angular Core 项目将解决此问题。

关于Angular Dot Net Core 2.0 构建问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45764501/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com