0

我正在尝试通过 Dropbox 将我的 node.js 应用程序应用到 Azure。过去它运行良好,但经过几次更新后,我收到“部署失败”,并出现以下日志错误。

构建节点时间模块似乎存在问题。我不记得安装它了,但我假设它是在我安装“moment”模块时出现的。

有什么想法阻止它正常构建吗?

非常感谢!

Selected node.js version 0.8.19. Use package.json file to choose a different version.          
time@0.9.2 install C:\DWASFiles\Sites\mrtbrls-api\VirtualDirectory0\site\wwwroot\node_modules\time 
node-gyp rebuild
C:\DWASFiles\Sites\mrtbrls-api\VirtualDirectory0\site\wwwroot\node_modules\time>node    
"D:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-         gyp\bin\node-gyp.js" rebuild 
gypnpm ERR! time@0.9.2 install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1

An error has occurred during web site deployment.
npm ERR! 
npm ERR! Failed at the time@0.9.2 install script.
npm ERR! This is most likely a problem with the time package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls time
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "D:\\Program Files (x86)\\nodejs\\0.8.19\\node.exe" "D:\\Program Files  (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--production"
npm ERR! cwd C:\DWASFiles\Sites\mrtbrls-api\VirtualDirectory0\site\wwwroot
npm ERR! node -v v0.8.19
npm ERR! npm -v 1.1.37
npm ERR! code ELIFECYCLE
npm ERR! message time@0.9.2 install: `node-gyp rebuild`
npm ERR! message `cmd "/c" "node-gyp rebuild"` failed with 1
npm
4

1 回答 1

0

我刚刚想通了,所以我把答案留在这里,让下一个人来解决这个问题。package.json 文件不包含此依赖项

"dependencies": {
  "connect": "~2.7.4",
  "express": "~3.1.1",
  "node-uuid": "~1.4.0",
  "nodemon": "~0.7.6",
  "request": "~2.16.6",
  "shortid": "~1.0.9",
  "moment": "~2.0.0",
  "underscore": "~1.4.4",
  "cron": "~1.0.1",
  "time": "~0.9.2"
},

我认为如果它可以超过时间错误,它会遇到一些其他错误,因为缺少一些其他依赖项。

于 2013-06-10T17:27:09.423 回答