antd-admin icon indicating copy to clipboard operation
antd-admin copied to clipboard

node v8.2.1 npm run build:dll报错

Open quanpower opened this issue 9 years ago • 6 comments

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] build:dll: roadhog buildDll npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] build:dll 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! /home/quanpower/.npm/_logs/2017-08-07T02_45_54_076Z-debug.log ➜ antd-admin git:(master) ✗ vim /home/quanpower/.npm/_logs/2017-08-07T02_45_54_076Z-debug.log

log里面是 :

0 info it worked if it ends with ok 1 verbose cli [ '/home/quanpower/.nvm/versions/node/v8.2.1/bin/node', 1 verbose cli '/home/quanpower/.nvm/versions/node/v8.2.1/bin/npm', 1 verbose cli 'run', 1 verbose cli 'build:dll' ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ 'prebuild:dll', 'build:dll', 'postbuild:dll' ] 5 info lifecycle [email protected]~prebuild:dll: [email protected] 6 info lifecycle [email protected]~build:dll: [email protected] 7 verbose lifecycle [email protected]~build:dll: unsafe-perm in lifecycle true 8 verbose lifecycle [email protected]~build:dll: PATH: /home/quanpower/.nvm/versions/node/v8.2.1/lib/node_modules/npm/bin/node-gyp-bin:/home/quanpower/antd-admin/node_modules/.bin:/home/quanpower/.nvm/versions/node/v8.2.1/bin:/home/quanpower/bin:/home/quanpower/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin 9 verbose lifecycle [email protected]~build:dll: CWD: /home/quanpower/antd-admin 10 silly lifecycle [email protected]~build:dll: Args: [ '-c', 'roadhog buildDll' ] 11 silly lifecycle [email protected]~build:dll: Returned: code: 1 signal: null 12 info lifecycle [email protected]~build:dll: Failed to exec build:dll script 13 verbose stack Error: [email protected] build:dll: roadhog buildDll 13 verbose stack Exit status 1 13 verbose stack at EventEmitter. (/home/quanpower/.nvm/versions/node/v8.2.1/lib/node_modules/npm/lib/utils/lifecycle.js:289:16) 13 verbose stack at emitTwo (events.js:125:13) 13 verbose stack at EventEmitter.emit (events.js:213:7) 13 verbose stack at ChildProcess. (/home/quanpower/.nvm/versions/node/v8.2.1/lib/node_modules/npm/lib/utils/spawn.js:40:14) 13 verbose stack at emitTwo (events.js:125:13) 13 verbose stack at ChildProcess.emit (events.js:213:7) 13 verbose stack at maybeClose (internal/child_process.js:921:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) 14 verbose pkgid [email protected] 15 verbose cwd /home/quanpower/antd-admin 16 verbose Linux 4.10.0-30-generic 17 verbose argv "/home/quanpower/.nvm/versions/node/v8.2.1/bin/node" "/home/quanpower/.nvm/versions/node/v8.2.1/bin/npm" "run" "build:dll" 18 verbose node v8.2.1 19 verbose npm v5.3.0 20 error code ELIFECYCLE 21 error errno 1 22 error [email protected] build:dll: roadhog buildDll 22 error Exit status 1 23 error Failed at the [email protected] build:dll script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

Node v8.2.1 npm 5.3.0

quanpower avatar Aug 07 '17 03:08 quanpower

试了下node v8.1.4也是,npm5.0.3

quanpower avatar Aug 07 '17 03:08 quanpower

npm i [email protected], 不要安装到全局

zuiidea avatar Aug 07 '17 03:08 zuiidea

[email protected]这个本来就在项目下的node-modules里,不知道是不是今天拉4.3.2的代码的原因。后面npm也报了一堆错,折腾了一天把node-modules删掉,把package-lock.json删掉npm install重头来过了。谢谢 @zuiidea

quanpower avatar Aug 07 '17 11:08 quanpower

不好意思,还得麻烦下,换新环境还是一直报这个错,删了装删了装10多遍了,这直接搞到凌晨了,2台电脑都是,Ubuntu16.4,然后nvm管理的node,试过几个版本都是,npm5.3.0,webpack跟roadhog确定不是全局,在目录下,npm list 看所以依赖都安装成功,roadhog版本 v1.1.2,webpack v3.3.5,谢谢,很容易复现


[email protected] build:dll /root/smart-iiot/antd-admin roadhog buildDll

Creating dll bundle... Failed to compile.

Module not found: Error: Can't resolve 'fs' in '/root/smart-iiot/antd-admin/node_modules/chokidar'

Module not found: Error: Can't resolve 'fs' in '/root/smart-iiot/antd-admin/node_modules/chokidar/lib'

Module not found: Error: Can't resolve 'fs' in '/root/smart-iiot/antd-admin/node_modules/chokidar/lib'

Module not found: Error: Can't resolve 'fs' in '/root/smart-iiot/antd-admin/node_modules/graceful-fs'

Module not found: Error: Can't resolve 'fs' in '/root/smart-iiot/antd-admin/node_modules/graceful-fs'

Module not found: Error: Can't resolve 'fs' in '/root/smart-iiot/antd-admin/node_modules/loader-runner/lib'

Module not found: Error: Can't resolve 'fs' in '/root/smart-iiot/antd-admin/node_modules/mkdirp'

Module not found: Error: Can't resolve 'fs' in '/root/smart-iiot/antd-admin/node_modules/uglify-js/tools'

Module not found: Error: Can't resolve 'fs' in '/root/smart-iiot/antd-admin/node_modules/webpack/lib/node'

Module not found: Error: Can't resolve 'fs' in '/root/smart-iiot/antd-admin/node_modules/webpack/lib/node'

Module not found: Error: Can't resolve 'module' in '/root/smart-iiot/antd-admin/node_modules/webpack/lib'

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] build:dll: roadhog buildDll npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] build:dll 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! /root/.npm/_logs/2017-08-19T16_49_55_495Z-debug.log

quanpower avatar Aug 19 '17 17:08 quanpower

@quanpower 问题解决了吗?

nil-w avatar Aug 26 '17 01:08 nil-w

@yqwoe 我把自己加的东西全干掉,重新拉的一份跟zuiidea一样的跑起来了

quanpower avatar Aug 28 '17 02:08 quanpower