Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERR:coding-web-ide@1.0.0 build: NODE_ENV=production ./node_modules/.bin/webpack #3

Closed
szy0syz opened this issue Sep 13, 2016 · 13 comments

Comments

@szy0syz
Copy link

szy0syz commented Sep 13, 2016

npm ERR! Linux 4.4.0-36-generic
npm ERR! argv "/root/.nvm/versions/node/v4.5.0/bin/node" "/root/.nvm/versions/node/v4.5.0/bin/npm" "run" "build"
npm ERR! node v4.5.0
npm ERR! npm v3.10.8
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! coding-web-ide@1.0.0 build: NODE_ENV=production ./node_modules/.bin/webpack
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the coding-web-ide@1.0.0 build script 'NODE_ENV=production ./node_modules/.bin/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 coding-web-ide package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! NODE_ENV=production ./node_modules/.bin/webpack
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs coding-web-ide
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls coding-web-ide
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/szy0syz/WebIDE-Workspace/frontend/npm-debug.log

@hackape
Copy link
Contributor

hackape commented Sep 14, 2016

需要你的 npm-debug.log 才知道什么问题

@dos1in
Copy link

dos1in commented Sep 14, 2016

我这边也有同样的问题:

npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/Cellar/node/6.5.0/bin/node" "/usr/local/bin/npm" "run" "build"
npm ERR! node v6.5.0
npm ERR! npm  v3.10.3
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! coding-web-ide@1.0.0 build: `NODE_ENV=production ./node_modules/.bin/webpack`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the coding-web-ide@1.0.0 build script 'NODE_ENV=production ./node_modules/.bin/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 coding-web-ide package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     NODE_ENV=production ./node_modules/.bin/webpack
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs coding-web-ide
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls coding-web-ide
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/souche/dfc/webide/WebIDE-Workspace/frontend/npm-debug.log

npm-debug.log如下:

1 verbose cli [ '/usr/local/Cellar/node/6.5.0/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'run',
1 verbose cli   'build' ]
2 info using npm@3.10.3
3 info using node@v6.5.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle coding-web-ide@1.0.0~prebuild: coding-web-ide@1.0.0
6 silly lifecycle coding-web-ide@1.0.0~prebuild: no script for prebuild, continuing
7 info lifecycle coding-web-ide@1.0.0~build: coding-web-ide@1.0.0
8 verbose lifecycle coding-web-ide@1.0.0~build: unsafe-perm in lifecycle true
9 verbose lifecycle coding-web-ide@1.0.0~build: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/souche/dfc/webide/WebIDE-Workspace/frontend/node_modules/.bin:/usr/local/Cellar/node/6.5.0/bin:/Users/souche/.rvm/gems/ruby-2.3.0/bin:/Users/souche/.rvm/gems/ruby-2.3.0@global/bin:/Users/souche/.rvm/rubies/ruby-2.3.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/souche/.rvm/bin
10 verbose lifecycle coding-web-ide@1.0.0~build: CWD: /Users/souche/dfc/webide/WebIDE-Workspace/frontend
11 silly lifecycle coding-web-ide@1.0.0~build: Args: [ '-c', 'NODE_ENV=production ./node_modules/.bin/webpack' ]
12 info lifecycle coding-web-ide@1.0.0~build: Failed to exec build script
13 verbose stack Error: coding-web-ide@1.0.0 build: `NODE_ENV=production ./node_modules/.bin/webpack`
13 verbose stack spawn ENOENT
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:33:16)
13 verbose stack     at emitTwo (events.js:106:13)
13 verbose stack     at ChildProcess.emit (events.js:191:7)
13 verbose stack     at maybeClose (internal/child_process.js:877:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
14 verbose pkgid coding-web-ide@1.0.0
15 verbose cwd /Users/souche/dfc/webide/WebIDE-Workspace/frontend
16 error Darwin 15.6.0
17 error argv "/usr/local/Cellar/node/6.5.0/bin/node" "/usr/local/bin/npm" "run" "build"
18 error node v6.5.0
19 error npm  v3.10.3
20 error file sh
21 error code ELIFECYCLE
22 error errno ENOENT
23 error syscall spawn
24 error coding-web-ide@1.0.0 build: `NODE_ENV=production ./node_modules/.bin/webpack`
24 error spawn ENOENT
25 error Failed at the coding-web-ide@1.0.0 build script 'NODE_ENV=production ./node_modules/.bin/webpack'.
25 error Make sure you have the latest version of node.js and npm installed.
25 error If you do, this is most likely a problem with the coding-web-ide package,
25 error not with npm itself.
25 error Tell the author that this fails on your system:
25 error     NODE_ENV=production ./node_modules/.bin/webpack
25 error You can get information on how to open an issue for this project with:
25 error     npm bugs coding-web-ide
25 error Or if that isn't available, you can get their info via:
25 error     npm owner ls coding-web-ide
25 error There is likely additional logging output above.
26 verbose exit [ 1, true ]

麻烦看下呢

@hackape
Copy link
Contributor

hackape commented Sep 14, 2016

node_modules/.bin 确认下这个目录是不是存在,没有的话说明,安装的时候 webpack 的 bin 没有 link 到这个目录下,多半是因为这个。 @JChord @szy0syz

@hackape
Copy link
Contributor

hackape commented Sep 14, 2016

暂时可以用 node 直接调用一下 webpack 的 bin 程序。把 WebIDE-Frontend/package.json scripts.build 字段改为:
NODE_ENV=production node node_modules/webpack/bin/webpack.js
应该就解决了。更完善的解决方法我调查后更新到代码里。

@hackape
Copy link
Contributor

hackape commented Sep 14, 2016

coding/WebIDE-Frontend@a9684c7 已经修好了

@hackape hackape closed this as completed Sep 14, 2016
@junbaor
Copy link

junbaor commented Sep 14, 2016

QQ截图20160914183842.png
已经 pull 最新版本的代码还是会卡在这里,
改为 NODE_ENV=production node node_modules/webpack/bin/webpack.js 后问题依旧。

@hackape
Copy link
Contributor

hackape commented Sep 14, 2016

@junbaor 它只是编译时间比较长,应该没问题,等等看

@junbaor
Copy link

junbaor commented Sep 14, 2016

@hackape 然后我的主机就失去联系了 😳

@hackape
Copy link
Contributor

hackape commented Sep 14, 2016

呃?所以你是 ssh 到一台远程机器在做这个咯…掉线我就管不了了。只能告诉你,这个命令是让 webpack 去编译项目,完成后 frontend 目录下会生成一个 build/ 目录,里面有4 个文件,你可以验证一下这个点。

断线的话,就后台运行一下吧,过会儿再上去看看。
------------------ Original ------------------
From: "junbaor"notifications@github.com
Date: Wed, Sep 14, 2016 06:59 PM
To: "Coding/WebIDE"WebIDE@noreply.github.com;
Cc: "hackape"zhangshuo@tiguanjia.com;"Mention"mention@noreply.github.com;
Subject: Re: [Coding/WebIDE] ERR:coding-web-ide@1.0.0 build:NODE_ENV=production ./node_modules/.bin/webpack (#3)

@hackape 然后我的主机就失去联系了


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@junbaor
Copy link

junbaor commented Sep 14, 2016

Screenshot_20160914-192309.png

前端模块目录下执行 npm ls 会有几个 error,不太懂前端,请问有影响吗?

@hackape
Copy link
Contributor

hackape commented Sep 14, 2016

不要紧的。话说你这 app 是什么,好帅~

@junbaor
Copy link

junbaor commented Sep 14, 2016

@hackape JuiceSSH 😯

@szy0syz
Copy link
Author

szy0syz commented Sep 15, 2016

@hackape 多谢完美

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants