我正在尝试在Snowflake Server中运行nodejs代码。代码没有问题,但我得到了以下响应:
`Error:` Cannot find module 'request-promise'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/home/server/auth/AuthController.js:10:10)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)我尝试在stackoverflow和其他网站上研究类似的问题,并提出了以下解决方案:运行命令npm install request-premise --save
这将显示以下输出:
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/request-premise - Not found
npm ERR! 404
npm ERR! 404 'request-premise@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-07-27T12_45_13_757Z-debug.log有谁请帮帮忙
发布于 2021-07-27 21:04:19
这是一个打字错误。应该是npm install request-promise --save而不是npm install request-premise --save。
你用"e“写premise,而不是用"o”写promise。
https://stackoverflow.com/questions/68545357
复制相似问题