提款机里的一元钱 2021-10-12 15:48 采纳率: 100%
浏览 73
已结题

react 项目打包的时候报错Unexpected token: punc ()) [index.js:20434,18]

img


Creating an optimized production build...
Failed to compile.

index.js from UglifyJs
Unexpected token: punc ()) [index.js:20434,18]

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! haier-gsop@1.0.0 build: `roadhog build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the haier-gsop@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\wenlong\AppData\Roaming\npm-cache\_logs\2021-10-12T07_36_33_012Z-debug.log
npm ERR!     C:\Users\wenlong\AppData\Roaming\npm-cache\_logs\2021-10-12T07_36_33_012Z-debug.log这里面的内容是
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'build'
1 verbose cli ]
2 info using npm@6.13.4
3 info using node@v12.16.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle haier-gsop@1.0.0~prebuild: haier-gsop@1.0.0
6 info lifecycle haier-gsop@1.0.0~build: haier-gsop@1.0.0
7 verbose lifecycle haier-gsop@1.0.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle haier-gsop@1.0.0~build: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\paoject1\mplm-ui\node_modules\.bin;D:\VMware Workstation Pro\bin\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\VisualSVN Server\bin;C:\Program Files\Git\cmd;C:\Program Files (x86)\Yarn\bin\;C:\Program Files\nodejs\;D:\Microsoft VS Code\bin;C:\Users\wenlong\AppData\Local\Microsoft\WindowsApps;D:\Microsoft VS Code\bin;C:\PHPnow\MySQL-5.1.50\bin;C:\Users\wenlong\AppData\Local\Yarn\bin;C:\Program Files\MongoDB\Server\4.2\bin;;D:\WebStorm 2020.3.3\bin;;C:\Users\wenlong\AppData\Roaming\npm
9 verbose lifecycle haier-gsop@1.0.0~build: CWD: D:\paoject1\mplm-ui
10 silly lifecycle haier-gsop@1.0.0~build: Args: [ '/d /s /c', 'roadhog build' ]
11 silly lifecycle haier-gsop@1.0.0~build: Returned: code: 1  signal: null
12 info lifecycle haier-gsop@1.0.0~build: Failed to exec build script
13 verbose stack Error: haier-gsop@1.0.0 build: `roadhog build`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:321:20)
13 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:321:20)
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid haier-gsop@1.0.0
15 verbose cwd D:\paoject1\mplm-ui
16 verbose Windows_NT 10.0.18363
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
18 verbose node v12.16.0
19 verbose npm  v6.13.4
20 error code ELIFECYCLE
21 error errno 1
22 error haier-gsop@1.0.0 build: `roadhog build`
22 error Exit status 1
23 error Failed at the haier-gsop@1.0.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]


  • 写回答

2条回答 默认 最新

  • 有问必答小助手 2021-10-14 10:27
    关注

    你好,我是有问必答小助手,非常抱歉,本次您提出的有问必答问题,技术专家团超时未为您做出解答


    本次提问扣除的有问必答次数,将会以问答VIP体验卡(1次有问必答机会、商城购买实体图书享受95折优惠)的形式为您补发到账户。


    因为有问必答VIP体验卡有效期仅有1天,您在需要使用的时候【私信】联系我,我会为您补发。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

问题事件

  • 系统已结题 10月22日
  • 已采纳回答 10月14日
  • 创建了问题 10月12日

悬赏问题

  • ¥15 如何删除这个虚拟音频
  • ¥50 hyper默认的default switch
  • ¥15 网站打不开,提示502 Bad Gateway
  • ¥20 基于MATLAB的绝热压缩空气储能系统代码咨询
  • ¥15 R语言建立随机森林模型出现的问题
  • ¥15 中级微观经济学,生产可能性边界问题
  • ¥15 TCP传输时不同网卡传输用时差异过大
  • ¥15 请各位看看我写的属于什么算法,或者有更正确的写法?
  • ¥15 html5 qrcode 扫描器
  • ¥15 爬取网页信息并保存需要完整代码