nodejsclub在Windows2003里测试运行报错
发布于 9 年前 作者 e4glet 4670 次浏览 最后一次编辑是 8 年前 来自 问答

nodejs err.png

如图所示: D:\nodejsapp\club>node app.js module.js:338 throw err; ^ Error: Cannot find module './config’ at Function.Module._resolveFilename (module.js:336:15) at Function.Module._load (module.js:278:25) at Module.require (module.js:365:17) at require (module.js:384:17) at Object.<anonymous> (D:\nodejsapp\club\app.js:9:14) at Module._compile (module.js:460:26) at Object.Module._extensions…js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Function.Module.runMain (module.js:501:10)

环境没我问题,express创建测试helloworld范例,创建支持ejs的nodejs项目运行也没问题
我安装的方法是
用express club
cd club
npm install
npm install ./

D:\nodejsapp\club>npm start

npm ERR! Windows_NT 5.2.3790 npm ERR! argv “C:\Program Files\nodejs\\node.exe” “C:\Program Files\nodejs \node_modules\npm\bin\npm-cli.js” "start" npm ERR! node v0.12.0 npm ERR! npm v2.5.1

npm ERR! missing script: start npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! http://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request: npm ERR! D:\nodejsapp\club\npm-debug.log

我这个版本是v0.12.0,npm start报上面错误 最上面运行的是node app.js,求解?

1 回复

nodejs err2.png

目录结构如下

回到顶部