[英]Hostgator npm: npm run watch give error
我有Hostgator雲站點。 我不知道問題是什么。
正確安裝了節點和npm。
節點-v:v8.11.1
npm -v:5.6.0
當我嘗試運行此命令時
npm run watch
它給出了這個錯誤
> @ watch /home2/wgrltz65/wedding.ajdandd.tech
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
sh: cross-env: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! @ watch: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the @ watch 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! /home2/wgrltz65/.npm/_logs/2018-04-18T19_44_08_103Z-debug.log
當我輸入日志時,我發現此日志:
0 info it worked if it ends with ok
1 verbose cli [ '/home2/wgrltz65/bin/node',
1 verbose cli '/home2/wgrltz65/bin/npm',
1 verbose cli 'run',
1 verbose cli 'watch' ]
2 info using npm@5.6.0
3 info using node@v8.11.1
4 verbose run-script [ 'prewatch', 'watch', 'postwatch' ]
5 info lifecycle @~prewatch: @
6 info lifecycle @~watch: @
7 verbose lifecycle @~watch: unsafe-perm in lifecycle true
8 verbose lifecycle @~watch: PATH: /home2/wgrltz65/nodejs/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home2/wgrltz65/wedding.ajdandd.tech/node_modules/.bin:/usr/local/jdk/bin:/home2/wgrltz65/perl5/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/opt/cpanel/composer/bin:/opt/python27/bin:/usr/local/bin:/usr/X11R6/bin:/home2/wgrltz65/bin
9 verbose lifecycle @~watch: CWD: /home2/wgrltz65/wedding.ajdandd.tech
10 silly lifecycle @~watch: Args: [ '-c',
10 silly lifecycle 'cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js' ]
11 info lifecycle @~watch: Failed to exec watch script
12 verbose stack Error: @ watch: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
12 verbose stack spawn ENOENT
12 verbose stack at ChildProcess.<anonymous> (/home2/wgrltz65/nodejs/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack at emitTwo (events.js:126:13)
12 verbose stack at ChildProcess.emit (events.js:214:7)
12 verbose stack at maybeClose (internal/child_process.js:925:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
13 verbose pkgid @
14 verbose cwd /home2/wgrltz65/wedding.ajdandd.tech
15 verbose Linux 3.10.0-693.17.1.2.ELK.el6.x86_64
16 verbose argv "/home2/wgrltz65/bin/node" "/home2/wgrltz65/bin/npm" "run" "watch"
17 verbose node v8.11.1
18 verbose npm v5.6.0
19 error file sh
20 error code ELIFECYCLE
21 error errno ENOENT
22 error syscall spawn
23 error @ watch: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
23 error spawn ENOENT
24 error Failed at the @ watch script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]
看起來hostgator不支持共享基礎結構上的節點: http : //support.hostgator.com/articles/specialized-help/technical/node-js
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.