当前位置: 首页 > 工具软件 > NodeClub > 使用案例 >

window部署nodeclub 出现问题,跪求支援

司空实
2023-12-01

因为操作比文字更具有说服力和把事情说清楚,因此我把自己的操作贴出来,希望大家不要嫌弃麻烦,同时如果你是专家,请赐教,呵呵。


D:\OpenSources\Nodejs\nodeclub.git\trunk>dir
 驱动器 D 中的卷是 Software
 卷的序列号是 0003-5BCE

 D:\OpenSources\Nodejs\nodeclub.git\trunk 的目录

2012/05/23  16:45    <DIR>          .
2012/05/23  16:45    <DIR>          ..
2012/05/22  16:56                60 .gitignore
2012/05/22  16:56                24 .naeignore
2012/05/22  16:56             1,848 app.js
2012/05/22  16:56             1,327 config.default.js
2012/05/22  16:56    <DIR>          controllers
2012/05/22  16:56         4,037,790 History.md
2012/05/22  16:56    <DIR>          libs
2012/05/22  16:56    <DIR>          models
2012/05/22  16:56               343 package.json
2012/05/22  16:56    <DIR>          plugins
2012/05/22  16:56    <DIR>          public
2012/05/22  16:56             1,692 README.md
2012/05/22  16:56             3,164 routes.js
2012/05/22  16:56    <DIR>          views
               8 个文件      4,046,248 字节
               8 个目录 33,909,018,624 可用字节

D:\OpenSources\Nodejs\nodeclub.git\trunk>npm install .\
npm http GET https://registry.npmjs.org/mongoose/2.4.1
npm http GET https://registry.npmjs.org/data2xml/0.4.0
npm http GET https://registry.npmjs.org/express/2.5.1
npm http GET https://registry.npmjs.org/ejs/0.5.0
npm http GET https://registry.npmjs.org/ndir/0.1.2
npm http GET https://registry.npmjs.org/eventproxy
npm http GET https://registry.npmjs.org/nodemailer/0.3.5
npm http GET https://registry.npmjs.org/validator/0.3.7
npm http GET https://registry.npmjs.org/node-markdown/0.1.0
npm http 304 https://registry.npmjs.org/mongoose/2.4.1
npm http 304 https://registry.npmjs.org/ejs/0.5.0
npm http 304 https://registry.npmjs.org/ndir/0.1.2
npm http 304 https://registry.npmjs.org/data2xml/0.4.0
npm http 304 https://registry.npmjs.org/express/2.5.1
npm http 304 https://registry.npmjs.org/eventproxy
npm http 304 https://registry.npmjs.org/nodemailer/0.3.5
npm http 304 https://registry.npmjs.org/validator/0.3.7
npm http 304 https://registry.npmjs.org/node-markdown/0.1.0
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/connect
npm http GET https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/mkdirp/0.0.7
npm http GET https://registry.npmjs.org/mailcomposer
npm http GET https://registry.npmjs.org/simplesmtp
npm http GET https://registry.npmjs.org/mongodb/0.9.7-1.4
npm http GET https://registry.npmjs.org/colors/0.5.1
npm http GET https://registry.npmjs.org/hooks/0.1.9
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/mkdirp/0.0.7
npm http 304 https://registry.npmjs.org/qs
npm http 304 https://registry.npmjs.org/connect
npm http 304 https://registry.npmjs.org/mailcomposer
npm http GET https://registry.npmjs.org/formidable
npm http 304 https://registry.npmjs.org/simplesmtp
npm http 304 https://registry.npmjs.org/mongodb/0.9.7-1.4
npm http 304 https://registry.npmjs.org/hooks/0.1.9
npm http 304 https://registry.npmjs.org/colors/0.5.1
npm http GET https://registry.npmjs.org/simplesmtp/-/simplesmtp-0.1.17.tgz
npm ERR! error rolling back mongoose@2.4.1 Error: ENOTEMPTY, rmdir 'D:\OpenSources\Nodejs\nodeclub.git\trunk\node_modules\mongoose'

npm ERR! Unsupported
npm ERR! Not compatible with your operating system or architecture: mongodb@0.9.7-1.4
npm ERR! Valid OS:    linux,darwin,freebsd
npm ERR! Valid Arch:  any
npm ERR! Actual OS:   win32
npm ERR! Actual Arch: ia32
npm ERR!
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" ".\\"
npm ERR! cwd D:\OpenSources\Nodejs\nodeclub.git\trunk
npm ERR! node -v v0.6.18
npm ERR! npm -v 1.1.21
npm ERR! code EBADPLATFORM
npm ERR! message Unsupported
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     D:\OpenSources\Nodejs\nodeclub.git\trunk\npm-debug.log
npm not ok

D:\OpenSources\Nodejs\nodeclub.git\trunk>dir
 驱动器 D 中的卷是 Software
 卷的序列号是 0003-5BCE

 D:\OpenSources\Nodejs\nodeclub.git\trunk 的目录

2012/05/23  16:46    <DIR>          .
2012/05/23  16:46    <DIR>          ..
2012/05/22  16:56                60 .gitignore
2012/05/22  16:56                24 .naeignore
2012/05/22  16:56             1,848 app.js
2012/05/22  16:56             1,327 config.default.js
2012/05/22  16:56    <DIR>          controllers
2012/05/22  16:56         4,037,790 History.md
2012/05/22  16:56    <DIR>          libs
2012/05/22  16:56    <DIR>          models
2012/05/23  16:46    <DIR>          node_modules
2012/05/23  16:46           129,814 npm-debug.log
2012/05/22  16:56               343 package.json
2012/05/22  16:56    <DIR>          plugins
2012/05/22  16:56    <DIR>          public
2012/05/22  16:56             1,692 README.md
2012/05/22  16:56             3,164 routes.js
2012/05/22  16:56    <DIR>          views
               9 个文件      4,176,062 字节
               9 个目录 33,905,991,680 可用字节

D:\OpenSources\Nodejs\nodeclub.git\trunk>node app.js

Error: Cannot find module 'formidable'
    at Function._resolveFilename (module.js:337:11)
    at Function._load (module.js:279:25)
    at Module.require (module.js:359:17)
    at require (module.js:375:17)
    at Object.<anonymous> (D:\OpenSources\Nodejs\nodeclub.git\trunk\node_modules\express\node_modules\connect\lib\middleware\bodyParser.js:14:18)
    at Module._compile (module.js:446:26)
    at Object..js (module.js:464:10)
    at Module.load (module.js:353:31)
    at Function._load (module.js:311:12)
    at Module.require (module.js:359:17)

D:\OpenSources\Nodejs\nodeclub.git\trunk>npm install formidable
npm http GET https://registry.npmjs.org/formidable
npm http 304 https://registry.npmjs.org/formidable
formidable@1.0.9 ./node_modules/formidable

D:\OpenSources\Nodejs\nodeclub.git\trunk>node app.js

module.js:337
    throw new Error("Cannot find module '" + request + "'");
          ^
Error: Cannot find module 'mongoose'
    at Function._resolveFilename (module.js:337:11)
    at Function._load (module.js:279:25)
    at Module.require (module.js:359:17)
    at require (module.js:375:17)
    at Object.<anonymous> (D:\OpenSources\Nodejs\nodeclub.git\trunk\models\index.js:1:78)
    at Module._compile (module.js:446:26)
    at Object..js (module.js:464:10)
    at Module.load (module.js:353:31)
    at Function._load (module.js:311:12)
    at Module.require (module.js:359:17)

D:\OpenSources\Nodejs\nodeclub.git\trunk>npm install mongoose
npm http GET https://registry.npmjs.org/mongoose/2.4.1
npm http 304 https://registry.npmjs.org/mongoose/2.4.1
npm http GET https://registry.npmjs.org/mongodb/0.9.7-1.4
npm http GET https://registry.npmjs.org/hooks/0.1.9
npm http GET https://registry.npmjs.org/colors/0.5.1
npm http 304 https://registry.npmjs.org/mongodb/0.9.7-1.4
npm http 304 https://registry.npmjs.org/hooks/0.1.9
npm http 304 https://registry.npmjs.org/colors/0.5.1
npm ERR! error rolling back mongoose@2.4.1 Error: ENOTEMPTY, rmdir 'D:\OpenSources\Nodejs\nodeclub.git\trunk\node_modules\mongoose'

npm ERR! Unsupported
npm ERR! Not compatible with your operating system or architecture: mongodb@0.9.7-1.4
npm ERR! Valid OS:    linux,darwin,freebsd
npm ERR! Valid Arch:  any
npm ERR! Actual OS:   win32
npm ERR! Actual Arch: ia32
npm ERR!
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "mongoose"
npm ERR! cwd D:\OpenSources\Nodejs\nodeclub.git\trunk
npm ERR! node -v v0.6.18
npm ERR! npm -v 1.1.21
npm ERR! code EBADPLATFORM
npm ERR! message Unsupported
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     D:\OpenSources\Nodejs\nodeclub.git\trunk\npm-debug.log
npm not ok

D:\OpenSources\Nodejs\nodeclub.git\trunk>node app.js

module.js:337
    throw new Error("Cannot find module '" + request + "'");
          ^
Error: Cannot find module 'mongoose'
    at Function._resolveFilename (module.js:337:11)
    at Function._load (module.js:279:25)
    at Module.require (module.js:359:17)
    at require (module.js:375:17)
    at Object.<anonymous> (D:\OpenSources\Nodejs\nodeclub.git\trunk\models\index.js:1:78)
    at Module._compile (module.js:446:26)
    at Object..js (module.js:464:10)
    at Module.load (module.js:353:31)
    at Function._load (module.js:311:12)
    at Module.require (module.js:359:17)

D:\OpenSources\Nodejs\nodeclub.git\trunk>

从以上操作,我可以简单说下自己碰到的一些问题:


1.

一开始我已经 npm install ./ 之后

照理说不应该再出现找不到 Error: Cannot find module 'formidable' 的情况

同时后来也不应该出现:Error: Cannot find module 'mongoose' 的情况啊

 

难道是跟系统有关系?因为从控制台的输出:
npm ERR! Unsupported
npm ERR! Not compatible with your operating system or architecture: mongodb@0.9.7-1.4
npm ERR! Valid OS:    linux,darwin,freebsd
npm ERR! Valid Arch:  any
npm ERR! Actual OS:   win32
npm ERR! Actual Arch: ia32

2.难道nodeclub在window下部署不了?

3.请高人赐教,临帖涕零,不知所言。

 类似资料: