简体   繁体   English

ng 构建失败并显示“您正在运行 Node.js 的 v8.11.3 版本,Angular CLI 8.0+ 不支持该版本。”

[英]ng build fails with “You are running version v8.11.3 of Node.js, which is not supported by Angular CLI 8.0+.”

I tried to reproduce a spring/angular [tutorial][1], but I am not able to run the ng build command (by maven).我试图重现 spring/angular [tutorial][1],但我无法运行 ng build 命令(通过 maven)。 I reinstalled the nodejs msi installer several times, but it still says that my nodes version is not supported.我多次重新安装了 nodejs msi 安装程序,但它仍然说我的节点版本不受支持。 I am very new to angular and have no idea what to do here.我对 angular 很陌生,不知道在这里做什么。 I found a lot of related problems that could be solved by npm cache clean and npm update but it does not solve my problem我发现很多相关问题可以通过 npm 缓存清理和 npm 更新来解决,但它并没有解决我的问题

windows 10 (64bit) windows 10(64位)

me> npm -v
6.9.0

me>node -v
v10.16.3



[INFO] > ng build
[INFO]
[ERROR] You are running version v8.11.3 of Node.js, which is not supported by Angular CLI 8.0+.
[ERROR] The official Node.js version that is supported is 10.9 or greater.
[ERROR]
[ERROR] Please visit https://nodejs.org/en/ to find instructions on how to update Node.js.
[ERROR] npm ERR! code ELIFECYCLE
[ERROR] npm ERR! errno 3
[ERROR] npm ERR! frontend@0.0.0 build: `ng build`
[ERROR] npm ERR! Exit status 3
[ERROR] npm ERR!
[ERROR] npm ERR! Failed at the frontend@0.0.0 build script.
[ERROR] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[ERROR]
[ERROR] npm ERR! A complete log of this run can be found in:
[ERROR] npm ERR!     C:\Users\example\AppData\Roaming\npm-cache\_logs\2019-10-18T18_24_53_469Z-debug.log
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] example 1.0-SNAPSHOT    ............................ SUCCESS [  0.384 s]
[INFO] frontend ........................................... FAILURE [ 13.778 s]
[INFO] backend 1.0-SNAPSHOT ............................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.609 s
[INFO] Finished at: 2019-10-18T20:24:53+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:npm (npm run build) on project frontend: Failed to run task: 'npm run bu
ild' failed. (error code 3) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :frontend


  [1]: https://dzone.com/articles/building-a-web-app-using-spring-boot-angular-6-and

You are using maven-fronted-plugin to install and execute a local distribution of node/npm, not the globally installed regular binaries.您正在使用 maven-fronted-plugin 安装和执行 node/npm 的本地分发,而不是全局安装的常规二进制文件。 See https://github.com/eirslett/frontend-maven-plugin for the configuration of desired node version in the maven pom.xml file.有关 maven pom.Z0F635D0E0F3874FFF8B581C132E6C7A7 文件中所需节点版本的配置,请参见https://github.com/eirslett/frontend-maven-plugin

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 &#39;您正在运行 Node.js 的版本 &#39; + process.version + &#39;,Angular CLI v6 不支持该版本 - 'You are running version ' + process.version + ' of Node.js, which is not supported by Angular CLI v6 如何在Linux上升级angular-cli? CLI v6不支持Node.js V6.14.3 - How to upgrade angular-cli on Linux? Node.js V6.14.3 not supported by CLI v6 docker 构建出现错误,检测到节点 v10,Angular CLI 需要 v12.14 或 v14.15 的最低 Node.js 版本 - docker build gives error, node v10 detected, The Angular CLI requires a minimum Node.js version of either v12.14 or v14.15 Angular CLI 需要最低 Node.js 版本 v14.20、v16.13 或 v18.10 - The Angular CLI requires a minimum Node.js version of either v14.20, v16.13 or v18.10 无法构建 Angular - “检测到 Node.js 版本 v10.6.0。” - Unable to build Angular - "Node.js version v10.6.0 detected." 尝试安装 angular cli 时 Node.JS 版本不同 - Node.JS version is different when trying to install angular cli 如果客户端关闭会话,nodejs v8.11.3在带有TLS的http2中中止 - nodejs v8.11.3 aborts in http2 with TLS if client closes session node.js 支持什么版本的 Javascript - What version of Javascript is supported in node.js 构建 Angular + docker - 为什么需要 node.js - Build Angular + docker - Why you need node.js 在Windows Azure网站上运行哪个版本的node.js? - Which version of node.js is running on Windows Azure Web Sites?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM