Open monlone opened 7 years ago
您好,shen,请问这个问题如何解决?
wemall@0.0.2 staticServ /data/wemall/nodejs node staticServ.js
/data/wemall/nodejs/node_modules/serve-static/index.js:40 throw new TypeError('root path required') ^
TypeError: root path required
at Function.serveStatic [as static] (/data/wemall/nodejs/node_modules/serve-static/index.js:40:11)
at Object.
npm ERR! Linux 3.10.0-514.16.1.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "staticServ"
npm ERR! node v6.11.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! wemall@0.0.2 staticServ: node staticServ.js
npm ERR! Exit status 1
npm ERR!
同样的问题,求大神解决
根据readme.md 顺序不要跳过,提示没有设置图片地址的问题,去设置config.uploadImgDir
npm run staticServ
/var/www/wemall/src/nodejs/node_modules/serve-static/index.js:40 throw new TypeError('root path required') ^
TypeError: root path required at Function.serveStatic [as static] (/var/www/wemall/src/nodejs/node_modules/serve-static/index.js:40:11) at Object. (/var/www/wemall/src/nodejs/staticServ.js:42:44)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:427:7)
at startup (bootstrap_node.js:151:9)
npm ERR! Linux 4.9.41-moby npm ERR! argv "/home/laradock/.nvm/versions/node/v7.10.0/bin/node" "/home/laradock/.nvm/versions/node/v7.10.0/bin/npm" "run" "staticServ" npm ERR! node v7.10.0 npm ERR! npm v4.2.0 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! wemall@0.0.2 staticServ:
node staticServ.js
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the wemall@0.0.2 staticServ script 'node staticServ.js'. 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 wemall package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node staticServ.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs wemall npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls wemall npm ERR! There is likely additional logging output above.npm ERR! Please include the following file with any support request: npm ERR! /root/.npm/_logs/2017-08-27T14_11_28_404Z-debug.log