2017-04-19 3 views
0

ich die Web-Seite mit dem Code zu öffnen versuchen gefolgt in Github und nicht auf den Server ausführen, um die Fehler und angezeigt mit Blick auf der Eingabeaufforderung wie folgt: LinkServer kann nicht und Fehler in Eingabeaufforderung angezeigt laufen

-Code : https://github.com/mschwarzmueller/nodejs-basics-tutorial/tree/master/09-mongodb

Fehler:

[email protected] Start C: \ Benutzer \ Atchaya \ Downloads \ NodeJS-Grundlagen-Tutorial-Master \ 09-mongodb

node ./bin/www

module.js:471 
    throw err; 
^ 

Error: Cannot find module 'express' 
    at Function.Module._resolveFilename (module.js:469:15) 
    at Function.Module._load (module.js:417:25) 
    at Module.require (module.js:497:17) 
    at require (internal/module.js:20:19) 
    at Object.<anonymous> (C:\Users\Atchaya\Downloads\nodejs-basics-tutorial-master\09-mongodb\app.js:1:77) 
    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) 
npm ERR! code ELIFECYCLE 
npm ERR! errno 1 
npm ERR! [email protected] start: `node ./bin/www` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] start script 'node ./bin/www'. 
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 05-express-first-app package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  node ./bin/www 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs 05-express-first-app 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls 05-express-first-app 
npm ERR! 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!  C:\Users\Atchaya\AppData\Roaming\npm-cache\_logs\2017-04-19T14_14_54_505Z-debug.log 
+2

haben Sie getan 'npm install' in' 09-mongodb' Ordner? –

+1

@Dan Ich glaube nicht, dass sie 'npm WARN Local package.json existiert, aber node_module fehlen, wollten Sie installieren?' – George

Antwort

1

Gehen Sie Ihren Ordner 09-mongodb, dann führen Sie npm install Befehl, dann führen Sie npm run start.

npm install -

This command installs a package, and any packages that it depends on. If the package has a shrinkwrap file, the installation of dependencies will be driven by that.

By default, npm install will install all modules listed as dependencies in package.json.

+0

Es funktionierte gut ... und in der Lage, den Server zu betreiben ... Danke für Ihre Antwort und antworte... –

Verwandte Themen