Open jeftom opened 5 years ago
https://www.npmjs.com/package/chromedriver#custom-binaries-url
chromedriver下载失败,我之前也遇到到,你可以在执行命令的用户下指定从国内下载或者指定路径即可
https://github.com/giggio/node-chromedriver/blob/master/install.js
附上node install.js 执行的脚本
https://www.npmjs.com/package/chromedriver#custom-binaries-url
chromedriver下载失败,我之前也遇到到,你可以在执行命令的用户下指定从国内下载或者指定路径即可
谢谢,我已经指定了 taobao 的地址的,手工在shell窗口执行是正常的,用 walle 调用时才报。
请问你这个问题解决了没
我这边也是遇到了这个问题,同样的命令放在shell上是可以的,用walle就不行,如果手动执行cnpm install以后,walle这一步就不报错了,但是到build的时候还是会报错,shell上是正常的。
我也是build的时候报错了
我遇到的是npm not found, PATH里已经把node的bin目录加进去了;必须要在/usr/bin里要添加软链才行; 添加了软链接,npm run build还是报错 ,总说spawn sh ENOENT
我也是 npm run build还是报错 ,总说spawn sh ENOENT; 我自己测试了一下local方法 fabric2 Connection local connection .local("cd /tmp/walle/codebase/1 && npm run build",pty=True, warn=True, watchers=[say_yes()]) 提示spawn sh ENOENT; 下面这个就不会 ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh.connect(HOST,22,USERNAME,PASSWORD,timeout=5) stdin, stdout, stderr = ssh.exec_command("cd /tmp/walle/codebase/1 && npm run build")
同问,看来这个问题出现的频率挺高
walle-python | [1/4] scripts.postinstall less-loader@4.1.0 › webpack@3.12.0 › uglifyjs-webpack-plugin@^0.4.6 run "node lib/post_install.js", root: "/opt/walle_home/codebase/3_5_20191108_113720/node_modules/_uglifyjs-webpack-plugin@0.4.6@uglifyjs-webpack-plugin" walle-python | [npminstall:runscript:error] less-loader@4.1.0 › webpack@3.12.0 › uglifyjs-webpack-plugin@^0.4.6 scripts.postinstall run "node lib/post_install.js" error: Error: spawn sh ENOENT walle-python | at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19) walle-python | at onErrorNT (internal/child_process.js:456:16) walle-python | at processTicksAndRejections (internal/process/task_queues.js:80:21) { walle-python | errno: 'ENOENT', walle-python | code: 'ENOENT', walle-python | syscall: 'spawn sh', walle-python | path: 'sh', walle-python | spawnargs: [Array] walle-python | } ✖ Install fail! Error: post install error, please remove node_modules before retry! walle-python | spawn sh ENOENT walle-python | Error: spawn sh ENOENT walle-python | at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19) walle-python | at onErrorNT (internal/child_process.js:456:16) walle-python | at processTicksAndRejections (internal/process/task_queues.js:80:21) walle-python | npminstall version: 3.23.0 walle-python | npminstall args: /root/node-v12.13.0-linux-x64/bin/node /root/node-v12.13.0-linux-x64/lib/node_modules/cnpm/node_modules/npminstall/bin/install.js --fix-bug-versions --china --userconfig=/tmp/.cnpmrc --disturl=https://npm.taobao.org/mirrors/node --registry=https://r.npm.taobao.org ⠴ [2/80] Installing delegate@^3.1.2[jspdf@1.5.3 › file-saver@github:eligrey/FileSaver.js#1.3.8] install file-saver from git github:eligrey/FileSaver.js#1.3.8, may be very slow, please keep patience ⠧ [34/80] Installing regjsparser@^0.1.4platform unsupported less-loader@4.1.0 › webpack@3.12.0 › watchpack@1.6.0 › chokidar@2.1.8 › fsevents@^1.2.7 Package require os(darwin) not compatible with your platform(linux) ⠇ [34/80] Installing postcss-discard-unused@^2.2.1[fsevents@^1.2.7] optional install error: Package require os(darwin) not compatible with your platform(linux) ✔ Installed 80 packages ✔ Linked 1077 latest versions walle-python | [1/4] scripts.postinstall less-loader@4.1.0 › webpack@3.12.0 › uglifyjs-webpack-plugin@^0.4.6 run "node lib/post_install.js", root: "/opt/walle_home/codebase/3_5_20191108_113720/node_modules/_uglifyjs-webpack-plugin@0.4.6@uglifyjs-webpack-plugin" walle-python | [npminstall:runscript:error] less-loader@4.1.0 › webpack@3.12.0 › uglifyjs-webpack-plugin@^0.4.6 scripts.postinstall run "node lib/post_install.js" error: Error: spawn sh ENOENT walle-python | at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19) walle-python | at onErrorNT (internal/child_process.js:456:16) walle-python | at processTicksAndRejections (internal/process/task_queues.js:80:21) { walle-python | errno: 'ENOENT', walle-python | code: 'ENOENT', walle-python | syscall: 'spawn sh', walle-python | path: 'sh', walle-python | spawnargs: [Array] walle-python | } ✖ Install fail! Error: post install error, please remove node_modules before retry! walle-python | spawn sh ENOENT walle-python | Error: spawn sh ENOENT walle-python | at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19) walle-python | at onErrorNT (internal/child_process.js:456:16) walle-python | at processTicksAndRejections (internal/process/task_queues.js:80:21) walle-python | npminstall version: 3.23.0 walle-python | npminstall args: /root/node-v12.13.0-linux-x64/bin/node /root/node-v12.13.0-linux-x64/lib/node_modules/cnpm/node_modules/npminstall/bin/install.js --fix-bug-versions --china --userconfig=/tmp/.cnpmrc --disturl=https://npm.taobao.org/mirrors/node --registry=https://r.npm.taobao.org walle-python | walle-python | Traceback (most recent call last): walle-python | File "/opt/walle_home/walle/service/waller.py", line 58, in run walle-python | raise Exception(stderr) ⠴ [2/80] Installing delegate@^3.1.2[jspdf@1.5.3 › file-saver@github:eligrey/FileSaver.js#1.3.8] install file-saver from git github:eligrey/FileSaver.js#1.3.8, may be very slow, please keep patience ⠧ [34/80] Installing regjsparser@^0.1.4platform unsupported less-loader@4.1.0 › webpack@3.12.0 › watchpack@1.6.0 › chokidar@2.1.8 › fsevents@^1.2.7 Package require os(darwin) not compatible with your platform(linux) ⠇ [34/80] Installing postcss-discard-unused@^2.2.1[fsevents@^1.2.7] optional install error: Package require os(darwin) not compatible with your platform(linux) ✔ Installed 80 packages ✔ Linked 1077 latest versions walle-python | [1/4] scripts.postinstall less-loader@4.1.0 › webpack@3.12.0 › uglifyjs-webpack-plugin@^0.4.6 run "node lib/post_install.js", root: "/opt/walle_home/codebase/3_5_20191108_113720/node_modules/_uglifyjs-webpack-plugin@0.4.6@uglifyjs-webpack-plugin" walle-python | [npminstall:runscript:error] less-loader@4.1.0 › webpack@3.12.0 › uglifyjs-webpack-plugin@^0.4.6 scripts.postinstall run "node lib/post_install.js" error: Error: spawn sh ENOENT walle-python | at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19) walle-python | at onErrorNT (internal/child_process.js:456:16) walle-python | at processTicksAndRejections (internal/process/task_queues.js:80:21) { walle-python | errno: 'ENOENT', walle-python | code: 'ENOENT', walle-python | syscall: 'spawn sh', walle-python | path: 'sh', walle-python | spawnargs: [Array] walle-python | } ✖ Install fail! Error: post install error, please remove node_modules before retry! walle-python | spawn sh ENOENT walle-python | Error: spawn sh ENOENT walle-python | at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19) walle-python | at onErrorNT (internal/child_process.js:456:16) walle-python | at processTicksAndRejections (internal/process/task_queues.js:80:21) walle-python | npminstall version: 3.23.0 walle-python | npminstall args: /root/node-v12.13.0-linux-x64/bin/node /root/node-v12.13.0-linux-x64/lib/node_modules/cnpm/node_modules/npminstall/bin/install.js --fix-bug-versions --china --userconfig=/tmp/.cnpmrc --disturl=https://npm.taobao.org/mirrors/node --registry=https://r.npm.taobao.org walle-python | ⠴ [2/80] Installing delegate@^3.1.2[jspdf@1.5.3 › file-saver@github:eligrey/FileSaver.js#1.3.8] install file-saver from git github:eligrey/FileSaver.js#1.3.8, may be very slow, please keep patience ⠧ [34/80] Installing regjsparser@^0.1.4platform unsupported less-loader@4.1.0 › webpack@3.12.0 › watchpack@1.6.0 › chokidar@2.1.8 › fsevents@^1.2.7 Package require os(darwin) not compatible with your platform(linux) ⠇ [34/80] Installing postcss-discard-unused@^2.2.1[fsevents@^1.2.7] optional install error: Package require os(darwin) not compatible with your platform(linux) ✔ Installed 80 packages ✔ Linked 1077 latest versions walle-python | [1/4] scripts.postinstall less-loader@4.1.0 › webpack@3.12.0 › uglifyjs-webpack-plugin@^0.4.6 run "node lib/post_install.js", root: "/opt/walle_home/codebase/3_5_20191108_113720/node_modules/_uglifyjs-webpack-plugin@0.4.6@uglifyjs-webpack-plugin" walle-python | [npminstall:runscript:error] less-loader@4.1.0 › webpack@3.12.0 › uglifyjs-webpack-plugin@^0.4.6 scripts.postinstall run "node lib/post_install.js" error: Error: spawn sh ENOENT walle-python | at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19) walle-python | at onErrorNT (internal/child_process.js:456:16) walle-python | at processTicksAndRejections (internal/process/task_queues.js:80:21) { walle-python | errno: 'ENOENT', walle-python | code: 'ENOENT', walle-python | syscall: 'spawn sh', walle-python | path: 'sh', walle-python | spawnargs: [Array] walle-python | } ✖ Install fail! Error: post install error, please remove node_modules before retry! walle-python | spawn sh ENOENT walle-python | Error: spawn sh ENOENT walle-python | at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19) walle-python | at onErrorNT (internal/child_process.js:456:16) walle-python | at processTicksAndRejections (internal/process/task_queues.js:80:21) walle-python | npminstall version: 3.23.0 walle-python | npminstall args: /root/node-v12.13.0-linux-x64/bin/node /root/node-v12.13.0-linux-x64/lib/node_modules/cnpm/node_modules/npminstall/bin/install.js --fix-bug-versions --china --userconfig=/tmp/.cnpmrc --disturl=https://npm.taobao.org/mirrors/node --registry=https://r.npm.taobao.org walle-python | walle-python | Traceback (most recent call last): walle-python | File "/opt/walle_home/walle/service/waller.py", line 58, in run walle-python | raise Exception(stderr) ⠴ [2/80] Installing delegate@^3.1.2[jspdf@1.5.3 › file-saver@github:eligrey/FileSaver.js#1.3.8] install file-saver from git github:eligrey/FileSaver.js#1.3.8, may be very slow, please keep patience ⠧ [34/80] Installing regjsparser@^0.1.4platform unsupported less-loader@4.1.0 › webpack@3.12.0 › watchpack@1.6.0 › chokidar@2.1.8 › fsevents@^1.2.7 Package require os(darwin) not compatible with your platform(linux) ⠇ [34/80] Installing postcss-discard-unused@^2.2.1[fsevents@^1.2.7] optional install error: Package require os(darwin) not compatible with your platform(linux) ✔ Installed 80 packages ✔ Linked 1077 latest versions walle-python | [1/4] scripts.postinstall less-loader@4.1.0 › webpack@3.12.0 › uglifyjs-webpack-plugin@^0.4.6 run "node lib/post_install.js", root: "/opt/walle_home/codebase/3_5_20191108_113720/node_modules/_uglifyjs-webpack-plugin@0.4.6@uglifyjs-webpack-plugin" walle-python | [npminstall:runscript:error] less-loader@4.1.0 › webpack@3.12.0 › uglifyjs-webpack-plugin@^0.4.6 scripts.postinstall run "node lib/post_install.js" error: Error: spawn sh ENOENT walle-python | at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19) walle-python | at onErrorNT (internal/child_process.js:456:16) walle-python | at processTicksAndRejections (internal/process/task_queues.js:80:21) { walle-python | errno: 'ENOENT', walle-python | code: 'ENOENT', walle-python | syscall: 'spawn sh', walle-python | path: 'sh', walle-python | spawnargs: [Array] walle-python | } ✖ Install fail! Error: post install error, please remove node_modules before retry! walle-python | spawn sh ENOENT walle-python | Error: spawn sh ENOENT walle-python | at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19) walle-python | at onErrorNT (internal/child_process.js:456:16) walle-python | at processTicksAndRejections (internal/process/task_queues.js:80:21) walle-python | npminstall version: 3.23.0 walle-python | npminstall args: /root/node-v12.13.0-linux-x64/bin/node /root/node-v12.13.0-linux-x64/lib/node_modules/cnpm/node_modules/npminstall/bin/install.js --fix-bug-versions --china --userconfig=/tmp/.cnpmrc --disturl=https://npm.taobao.org/mirrors/node --registry=https://r.npm.taobao.org
@nanjixiong218 我发现是环境变量的问题。 我这边通过设置PATH解决了 自己登录ssh后echo $PATH 查看下具体值,然后在walle后台附上系统环境变量就可以了, 例如我的PATH=/home/tomcat/.nvm/versions/node/v8.16.2/bin:/usr/local/jdk1.8/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/tomcat/.local/bin:/home/tomcat/bin
问题描述 在
owner
下,什么页面,发布 vue 项目时,手动在shell 执行npm install 时是正常的,在walle发布执行 npm install 脚本时报错:问题描述 日志堆栈贴上来。
/home/apps/.npm/_logs/2019-01-10T08_56_31_144Z-debug.log
logs/error.log
截图 拖拽到此处即可上传
运行环境