所以我在这里遵循本教程以获得一个个人/学习node.js项目,我想在GitHub上工作并存储并最终放到实时服务器或云托管上.它使用node.js,express,monk,mongoDB进行网站设置.但是我有一个持续的错误,当我运行'npm start'时,我没有找到答案.
当我尝试在我的node express项目中运行'npm start'时,这是我的命令窗口输出.
我知道:错误:找不到模块'C:\ Users\username\Desktop\bin\www'不在我的bin\www所在的位置(它在nodetest1项目中).
C:\ Users\username\Documents\GitHub\TEDResources \node.js \nodetest1 < - 正确的路径
那么,为什么npm会查看错误的位置,如何更新它以正确查看我的项目文件夹?我搜索过我的系统,无法在任何地方找到module.js.(使用Windows 7 x64)我也试过nuking node.js并表达并从头开始没有运气.
//控制台错误输出
Microsoft Windows [版本6.1.7601]版权所有(c)2009 Microsoft Corporation.版权所有.C:\ Users\username\Documents\GitHub\TEDResources \node.js \nodetest1> npm start
> nodetest1@0.0.0 start C:\Users\username\Documents\GitHub\TEDResources\node.j
s\nodetest1
> node ./bin/www
module.js:340
throw err;
^
Error: Cannot find module 'C:\Users\username\Desktop\bin\www'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3
npm ERR! nodetest1@0.0.0 start: `node ./bin/www`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed …Run Code Online (Sandbox Code Playgroud)