Olá, tudo bem? Quando fui fazer o build, deu o seguinte erro pra min:
ERROR in build.js from UglifyJs
Unexpected token: punc (() [./src/directives/Transform.js:5,4][build.js:453,8]
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! fotopic@1.0.0 build: cross-env NODE_ENV=production webpack --progress --hide-modules
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the fotopic@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\Davi Roberto\AppData\Roaming\npm-cache_logs\2017-08-13T22_36_31_963Z-debug.log
Ai quando fui ver o arquivo de log (2017-08-13T22_36_31_963Z-debug.log), estava assim:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Users\Davi Roberto\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'build' ]
2 info using npm@5.0.3
3 info using node@v6.10.3
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle fotopic@1.0.0~prebuild: fotopic@1.0.0
6 silly lifecycle fotopic@1.0.0~prebuild: no script for prebuild, continuing
7 info lifecycle fotopic@1.0.0~build: fotopic@1.0.0
8 verbose lifecycle fotopic@1.0.0~build: unsafe-perm in lifecycle true
9 verbose lifecycle fotopic@1.0.0~build: PATH: C:\Users\Davi Roberto\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;C:\xampp\htdocs\Projects\alura\Vue.js parte 1 - construindo Single Page Applications\fotoPic\node_modules.bin;C:\Users\Davi Roberto\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Davi Roberto\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files\PuTTY;C:\Program Files (x86)\Skype\Phone;C:\Program Files\VDownloader;C:\Ruby22-x64\bin;C:\Users\Davi Roberto\AppData\Local\Microsoft\WindowsApps;C:\Users\Davi Roberto\AppData\Roaming\npm;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Program Files\nodejs;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
10 verbose lifecycle fotopic@1.0.0~build: CWD: C:\xampp\htdocs\Projects\alura\Vue.js parte 1 - construindo Single Page Applications\fotoPic
11 silly lifecycle fotopic@1.0.0~build: Args: [ '/d /s /c',
11 silly lifecycle 'cross-env NODE_ENV=production webpack --progress --hide-modules' ]
12 silly lifecycle fotopic@1.0.0~build: Returned: code: 2 signal: null
13 info lifecycle fotopic@1.0.0~build: Failed to exec build script
14 verbose stack Error: fotopic@1.0.0 build: cross-env NODE_ENV=production webpack --progress --hide-modules
14 verbose stack Exit status 2
14 verbose stack at EventEmitter. (C:\Users\Davi Roberto\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:283:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess. (C:\Users\Davi Roberto\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:886:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid fotopic@1.0.0
16 verbose cwd C:\xampp\htdocs\Projects\alura\Vue.js parte 1 - construindo Single Page Applications\fotoPic
17 verbose Windows_NT 10.0.15063
18 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\Davi Roberto\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "build"
19 verbose node v6.10.3
20 verbose npm v5.0.3
21 error code ELIFECYCLE
22 error errno 2
23 error fotopic@1.0.0 build: cross-env NODE_ENV=production webpack --progress --hide-modules
23 error Exit status 2
24 error Failed at the fotopic@1.0.0 build script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 2, true ]
Enfim, não consegui entender nada rs. Fico agradecido desde já pela ajuda.
Abraços!