Npm编译报错Exit status 137 verbose stack at EventEmitter.<anonymous>

npm-debug.log日志内容

info it worked if it ends with ok

1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]

2 info using npm@3.10.10

3 info using node@v6.10.3

4 verbose run-script [ 'prestart', 'start', 'poststart' ]

5 info lifecycle samyoc-blog@0.1.0~prestart: samyoc-blog@0.1.0

6 silly lifecycle samyoc-blog@0.1.0~prestart: no script for prestart, continuing

7 info lifecycle samyoc-blog@0.1.0~start: samyoc-blog@0.1.0

8 verbose lifecycle samyoc-blog@0.1.0~start: unsafe-perm in lifecycle true

9 verbose lifecycle samyoc-blog@0.1.0~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/usr/myapps/samyoc/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin

10 verbose lifecycle samyoc-blog@0.1.0~start: CWD: /usr/myapps/samyoc

11 silly lifecycle samyoc-blog@0.1.0~start: Args: [ '-c', 'npm run rm-dist & npm run webpack' ]

12 silly lifecycle samyoc-blog@0.1.0~start: Returned: code: 137 signal: null

13 info lifecycle samyoc-blog@0.1.0~start: Failed to exec start script

14 verbose stack Error: samyoc-blog@0.1.0 start: `npm run rm-dist & npm run webpack`

14 verbose stack Exit status 137

14 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:255: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.<anonymous> (/usr/local/lib/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 samyoc-blog@0.1.0

16 verbose cwd /usr/myapps/samyoc

17 error Linux 3.10.0-514.10.2.el7.x86_64

18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"

19 error node v6.10.3

20 error npm v3.10.10

21 error code ELIFECYCLE

22 error samyoc-blog@0.1.0 start: `npm run rm-dist & npm run webpack`

22 error Exit status 137

23 error Failed at the samyoc-blog@0.1.0 start script 'npm run rm-dist & npm run webpack'.

23 error Make sure you have the latest version of node.js and npm installed.

23 error If you do, this is most likely a problem with the samyoc-blog package,

23 error not with npm itself.

23 error Tell the author that this fails on your system:

23 error npm run rm-dist & npm run webpack

23 error You can get information on how to open an issue for this project with:

23 error npm bugs samyoc-blog

23 error Or if that isn't available, you can get their info via:

23 error npm owner ls samyoc-blog

23 error There is likely additional logging output above.

24 verbose exit [ 1, true ]

控制台报错

npm ERR! Linux 3.10.0-514.10.2.el7.x86_64

npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"

npm ERR! node v6.10.3

npm ERR! npm  v3.10.10

npm ERR! code ELIFECYCLE

npm ERR! samyoc-blog@0.1.0 start: `npm run rm-dist & npm run webpack`

npm ERR! Exit status 137

npm ERR! 

npm ERR! Failed at the samyoc-blog@0.1.0 start script 'npm run rm-dist & npm run webpack'.

npm ERR! Make sure you have the latest version of node.js and npm installed.

npm ERR! If you do, this is most likely a problem with the samyoc-blog package,

npm ERR! not with npm itself.

npm ERR! Tell the author that this fails on your system:

npm ERR!     npm run rm-dist & npm run webpack

npm ERR! You can get information on how to open an issue for this project with:

npm ERR!     npm bugs samyoc-blog

npm ERR! Or if that isn't available, you can get their info via:

npm ERR!     npm owner ls samyoc-blog

npm ERR! There is likely additional logging output above.

 

npm ERR! Please include the following file with any support request:

npm ERR!     /usr/myapps/samyoc/npm-debug.log

Winter2018/03/12 14:45:31
其实也是因为内存不够了

那一楼的方法能解决问题吗

刹那花开2020/09/28 11:04:59

@刹那花开可以的,你可以试试

Winter2020/09/28 16:51:15
Winter2018/03/10 18:43:53
遇到这个问题是因为NPM的版本低了,我当前的版本v6.10.3,然后升级到最新的稳定版本就没问题了。 升级NPM也有个非常简便的方式 1. npm install -g n 安装n模块 2. n stable 安装稳定版本 然后搞定!