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

npm run staticServ 启动错误 #14

Open
monlone opened this issue Aug 27, 2017 · 3 comments
Open

npm run staticServ 启动错误 #14

monlone opened this issue Aug 27, 2017 · 3 comments

Comments

@monlone
Copy link

monlone commented Aug 27, 2017

npm run staticServ

[email protected] staticServ /var/www/wemall/src/nodejs
node staticServ.js

/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! [email protected] staticServ: node staticServ.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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

@monlone
Copy link
Author

monlone commented Aug 27, 2017

您好,shen,请问这个问题如何解决?

@mycheryhr
Copy link

[email protected] 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. (/data/wemall/nodejs/staticServ.js:42:44)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:389:7)
at startup (bootstrap_node.js:149:9)

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! [email protected] staticServ: node staticServ.js
npm ERR! Exit status 1
npm ERR!

同样的问题,求大神解决

@acter
Copy link

acter commented Nov 8, 2017

根据readme.md 顺序不要跳过,提示没有设置图片地址的问题,去设置config.uploadImgDir

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

3 participants