Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

请问这个报错是这么处理 #1

Closed
AKEXZ opened this issue Sep 1, 2019 · 2 comments
Closed

请问这个报错是这么处理 #1

AKEXZ opened this issue Sep 1, 2019 · 2 comments

Comments

@AKEXZ
Copy link

AKEXZ commented Sep 1, 2019

regx-node@0.0.1 start /www/wwwroot/World
node server.js

internal/modules/cjs/loader.js:626
throw err;
^

Error: Cannot find module 'express'
Require stack:

  • /www/wwwroot/World/server.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:623:15)
    at Function.Module._load (internal/modules/cjs/loader.js:527:27)
    at Module.require (internal/modules/cjs/loader.js:681:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    at Object. (/www/wwwroot/World/server.js:8:18)
    at Module._compile (internal/modules/cjs/loader.js:774:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
    at Module.load (internal/modules/cjs/loader.js:641:32)
    at Function.Module._load (internal/modules/cjs/loader.js:556:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:837:10) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ '/www/wwwroot/World/server.js' ]
    }
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! regx-node@0.0.1 start: node server.js
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the regx-node@0.0.1 start script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-09-01T15_33_53_830Z-debug.log

@AKEXZ
Copy link
Author

AKEXZ commented Sep 1, 2019

我刚刚安装了modules模块但还是提示未安装

@AKEXZ
Copy link
Author

AKEXZ commented Sep 1, 2019

不好意思,是因为没在根目录执行npm run start,已经成功谢谢

@AKEXZ AKEXZ closed this as completed Sep 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant