iview / iview-admin

Vue 2.0 admin management system template based on iView
https://admin.iviewui.com/
MIT License
16.49k stars 4.84k forks source link

大佬,打包报错 #453

Open xxi-arch opened 6 years ago

xxi-arch commented 6 years ago

image

xxi-arch commented 6 years ago

应该不是我的问题

xxi-arch commented 6 years ago

0 info it worked if it ends with ok 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' ] 2 info using npm@5.6.0 3 info using node@v8.9.4 4 verbose run-script [ 'prebuild', 'build', 'postbuild' ] 5 info lifecycle iview-admin-template@1.0.0~prebuild: iview-admin-template@1.0.0 6 info lifecycle iview-admin-template@1.0.0~build: iview-admin-template@1.0.0 7 verbose lifecycle iview-admin-template@1.0.0~build: unsafe-perm in lifecycle true 8 verbose lifecycle iview-admin-template@1.0.0~build: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\root\phpStudy_2016.11.03\WWW\public\node_modules.bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\WinSCP\;C:\Program Files (x86)\Java\jdk1.8.0_144\bin;C:\Program Files\nodejs\;C:\Users\乐而\AppData\Local\Programs\Python\Python36-32\Scripts\;C:\Users\乐而\AppData\Local\Programs\Python\Python36-32\;C:\Program Files (x86)\Python\Python36-32\Scripts;C:\Program Files (x86)\Python\Python36-32;C:\Users\乐而\AppData\Local\Microsoft\WindowsApps;C:\Users\乐而\AppData\Roaming\npm 9 verbose lifecycle iview-admin-template@1.0.0~build: CWD: C:\root\phpStudy_2016.11.03\WWW\public 10 silly lifecycle iview-admin-template@1.0.0~build: Args: [ '/d /s /c', 10 silly lifecycle 'webpack --progress --hide-modules --config build/webpack.prod.config.js' ] 11 silly lifecycle iview-admin-template@1.0.0~build: Returned: code: 2 signal: null 12 info lifecycle iview-admin-template@1.0.0~build: Failed to exec build script 13 verbose stack Error: iview-admin-template@1.0.0 build: webpack --progress --hide-modules --config build/webpack.prod.config.js 13 verbose stack Exit status 2 13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:285:16) 13 verbose stack at emitTwo (events.js:126:13) 13 verbose stack at EventEmitter.emit (events.js:214:7) 13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 13 verbose stack at emitTwo (events.js:126:13) 13 verbose stack at ChildProcess.emit (events.js:214:7) 13 verbose stack at maybeClose (internal/child_process.js:925:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) 14 verbose pkgid iview-admin-template@1.0.0 15 verbose cwd C:\root\phpStudy_2016.11.03\WWW\public 16 verbose Windows_NT 10.0.16299 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 v8.9.4 19 verbose npm v5.6.0 20 error code ELIFECYCLE 21 error errno 2 22 error iview-admin-template@1.0.0 build: webpack --progress --hide-modules --config build/webpack.prod.config.js 22 error Exit status 2 23 error Failed at the iview-admin-template@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 [ 2, true ]

xxi-arch commented 6 years ago

我用的是简化版

ChaoshengZhang commented 6 years ago

{ test: /iview.src.*?js$/, loader: 'babel-loader' }

IdenPin commented 6 years ago

@544751779 项目根目录新建一个.babelrc的文件写入 { "presets": ["es2015"] }

zhenizhui commented 6 years ago

https://github.com/iview/iview-admin/issues/400

看这个