首页 > 解决方案 > 如何修复使用命令 npm run build 时显示的错误?

问题描述

我尝试运行npm run build输出低于错误:

   root@tim-VPCEB42EG:/home/tavinder/es6# npm run build
    npm ERR! Linux 4.15.0-39-generic
    npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
    npm ERR! node v4.2.6
    npm ERR! npm  v3.5.2

    npm ERR! missing script: build
    npm ERR! 
    npm ERR! If you need help, you may report this error at:
    npm ERR!     <https://github.com/npm/npm/issues>

    npm ERR! Please include the following file with any support request:
    npm ERR!     /home/tavinder/es6/npm-debug.log

标签: node.jswebpack

解决方案


您的节点版本:4.2.6 最新版本的 webpack 所需的节点版本:最低 6.11.6 您需要更新您的节点或使用与我们的节点版本兼容的 webpack 版本 在此处输入图像描述


推荐阅读