当我尝试在项目中运行grunt build时,是什么导致我出错?

问题描述

我正在尝试构建一个庞大的项目。当我插入命令grunt build时,出现此错误

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
vagrant@myinteger:/vweb/www.afsb.net$ grunt
/vweb/www.afsb.net/node_modules/chalk/source/index.js:106
        ...styles,^^^

SyntaxError: Unexpected token ...
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:549:28)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/vweb/www.afsb.net/node_modules/grunt-legacy-log-utils/index.js:12:13)
vagrant@myinteger:/vweb/www.afsb.net$

我尝试删除node_modules文件夹,并且npm install运行没有问题。高

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)