[英]Problems installing bcrypt-nodejs on Windows machine
I am having some problems installing bcrypt-nodejs on Windows machine, not bcrypt but bcrypt-nodejs which is a different dependency. 我在Windows机器上安装bcrypt-nodejs时遇到一些问题,不是bcrypt而是bcrypt-nodejs,这是一个不同的依赖项。
I get the output below in the command line after doing npm install bcrypt-node.js
在执行npm install bcrypt-node.js
之后,我在命令行中获得以下输出
C:\web_dev_root_folder\facerecognitionbrain>npm install bcrypt-nodejs
npm WARN ts-pnp@1.0.1 requires a peer of typescript@* but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ bcrypt-nodejs@0.0.3
updated 1 package and audited 36348 packages in 31.525s
found 63 low severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
And when I go ahead and try to run my script by doing npm start
I get: 当我继续尝试通过执行npm start
运行脚本时,我得到:
> facerecognitionbrain-api@1.0.0 start C:\web_dev_root_folder\facerecognitionbrain-api
> nodemon server.js
[nodemon] 1.18.10
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node server.js`
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module 'bcrypt-nodejs'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (C:\web_dev_root_folder\facerecognitionbrain-api\server.js:3:16)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
[nodemon] app crashed - waiting for file changes before starting...
Any solution to this will be greatly appreciated. 任何对此的解决方案将不胜感激。
Did you run your npm install
in the wrong directory? 您是否在错误的目录中运行了npm install
?
Looks like you did the npm install
in C:\\web_dev_root_folder\\facerecognitionbrain
, but you are requiring it in C:\\web_dev_root_folder\\facerecognitionbrain-api\\server.js
which is in a different directory. 看起来您已在C:\\web_dev_root_folder\\facerecognitionbrain
npm install
了npm install
,但您需要在其他目录中的C:\\web_dev_root_folder\\facerecognitionbrain-api\\server.js
中进行安装。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.