成功解决internal/modules/cjs/loader.js:596 throw err; ^ Error: Cannot find module 'express'

解决问题

F:\File_Solidity\nodetemplate>npm start

> [email protected] start F:\File_Solidity\nodetemplate
> node ./bin/start.js

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

Error: Cannot find module 'express'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)
    at Function.Module._load (internal/modules/cjs/loader.js:520:25)
    at Module.require (internal/modules/cjs/loader.js:650:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (F:\File_Solidity\nodetemplate\app.js:1:77)
    at Module._compile (internal/modules/cjs/loader.js:702:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
    at Module.load (internal/modules/cjs/loader.js:612:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
    at Function.Module._load (internal/modules/cjs/loader.js:543:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node ./bin/start.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start 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!     C:\Users\99386\AppData\Roaming\npm-cache\_logs\2018-07-05T06_23_18_870Z-debug.log

解决办法

npm install -g express



猜你喜欢

转载自blog.csdn.net/qq_41185868/article/details/80926620