Installation failure with bcrypt@5.0.1 on Windows. #84

Closed
opened 2026-02-04 17:04:00 +03:00 by OVERLORD · 7 comments
Owner

Originally created by @JeffreyZZ on GitHub (Mar 22, 2021).

As I ran npm install command on Windows 10, it failed with the following error with bcrypt@5.0.1. Could anyone please take a look at this issue?

bcrypt@5.0.1 install E:\git\references\planka\server\node_modules\bcrypt
node-pre-gyp install --fallback-to-build

'node-pre-gyp' is not recognized as an internal or external command,
operable program or batch file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bcrypt@5.0.1 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@5.0.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Originally created by @JeffreyZZ on GitHub (Mar 22, 2021). As I ran npm install command on Windows 10, it failed with the following error with bcrypt@5.0.1. Could anyone please take a look at this issue? > bcrypt@5.0.1 install E:\git\references\planka\server\node_modules\bcrypt > node-pre-gyp install --fallback-to-build 'node-pre-gyp' is not recognized as an internal or external command, operable program or batch file. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! **bcrypt@5.0.1 install: `node-pre-gyp install --fallback-to-build`** npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the bcrypt@5.0.1 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Author
Owner

@santosh commented on GitHub (Mar 23, 2021):

I am having the same issue. Was going to report, you did. 🙌🏽

@santosh commented on GitHub (Mar 23, 2021): I am having the same issue. Was going to report, you did. 🙌🏽
Author
Owner

@nickbe commented on GitHub (Mar 24, 2021):

Just look at the error message here:
Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
I guess that's exactly the problem.

@nickbe commented on GitHub (Mar 24, 2021): Just look at the error message here: `Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})` I guess that's exactly the problem.
Author
Owner

@JeffreyZZ commented on GitHub (Mar 24, 2021):

@nickbe, does this mean that this project doesn't support development on Windows 10? If so, what's the recommended OS to run this project?

@JeffreyZZ commented on GitHub (Mar 24, 2021): @nickbe, does this mean that this project doesn't support development on Windows 10? If so, what's the recommended OS to run this project?
Author
Owner

@santosh commented on GitHub (Mar 24, 2021):

@nickbe Well, I don't think that is a problem because:

  • It is an optional dependency.
  • That log output says it's a warning, not an error.
  • I'm getting the same warning on EC2 instance (t3a.small) in ap-south-1.
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
  • Regardless of the warning. The npm i succeeds on the EC2 instance.
@santosh commented on GitHub (Mar 24, 2021): @nickbe Well, I don't think that is a problem because: - It is an optional dependency. - That log output says it's a warning, not an error. - I'm getting the same warning on EC2 instance (t3a.small) in ap-south-1. ```sh npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) ``` - Regardless of the warning. The `npm i` succeeds on the EC2 instance.
Author
Owner

@meltyshev commented on GitHub (Mar 24, 2021):

I faced the same error when trying to install it on Windows. The workaround is to change the folder to the server and client and run npm i there. It may be an error due to the --prefix argument on Windows.

@meltyshev commented on GitHub (Mar 24, 2021): I faced the same error when trying to install it on Windows. The workaround is to change the folder to the `server` and `client` and run `npm i` there. It may be an error due to the `--prefix` argument on Windows.
Author
Owner

@JeffreyZZ commented on GitHub (Mar 25, 2021):

@meltyshev , npm -i works under server and client folder but npm run server:db:init failed with --prefix server, see the error below. Do you have any idea why it failed like this?

planka@0.1.0 server:db:init E:\git\others\planka
npm run db:init --prefix server

planka-server@ db:init E:\git\others\planka\server
node db/init.js

internal/crypto/keys.js:322
throw new ERR_INVALID_ARG_TYPE(
^

TypeError [ERR_INVALID_ARG_TYPE]: The "key" argument must be of type string or an instance of Buffer, TypedArray, DataView, or KeyObject. Received null
at prepareSecretKey (internal/crypto/keys.js:322:11)
at new Hmac (internal/crypto/hash.js:111:9)
at Object.createHmac (crypto.js:147:10)
at createHMAC (E:\git\others\planka\server\node_modules\pg\lib\sasl.js:133:17)
at Hi (E:\git\others\planka\server\node_modules\pg\lib\sasl.js:137:13)
at Object.continueSession (E:\git\others\planka\server\node_modules\pg\lib\sasl.js:32:24)
at Client._handleAuthSASLContinue (E:\git\others\planka\server\node_modules\pg\lib\client.js:257:10)
at Connection.emit (events.js:315:20)
at E:\git\others\planka\server\node_modules\pg\lib\connection.js:115:12
at Parser.parse (E:\git\others\planka\server\node_modules\pg-protocol\dist\parser.js:40:17) {
code: 'ERR_INVALID_ARG_TYPE'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! planka-server@ db:init: node db/init.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the planka-server@ db:init script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\jingzhou\AppData\Roaming\npm-cache_logs\2021-03-25T04_44_27_486Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! planka@0.1.0 server:db:init: npm run db:init --prefix server
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the planka@0.1.0 server:db:init script.

@JeffreyZZ commented on GitHub (Mar 25, 2021): @meltyshev , npm -i works under server and client folder but npm run server:db:init failed with --prefix server, see the error below. Do you have any idea why it failed like this? > planka@0.1.0 server:db:init E:\git\others\planka > npm run db:init --prefix server > planka-server@ db:init E:\git\others\planka\server > node db/init.js internal/crypto/keys.js:322 throw new ERR_INVALID_ARG_TYPE( ^ TypeError [ERR_INVALID_ARG_TYPE]: The "key" argument must be of type string or an instance of Buffer, TypedArray, DataView, or KeyObject. Received null at prepareSecretKey (internal/crypto/keys.js:322:11) at new Hmac (internal/crypto/hash.js:111:9) at Object.createHmac (crypto.js:147:10) at createHMAC (E:\git\others\planka\server\node_modules\pg\lib\sasl.js:133:17) at Hi (E:\git\others\planka\server\node_modules\pg\lib\sasl.js:137:13) at Object.continueSession (E:\git\others\planka\server\node_modules\pg\lib\sasl.js:32:24) at Client._handleAuthSASLContinue (E:\git\others\planka\server\node_modules\pg\lib\client.js:257:10) at Connection.emit (events.js:315:20) at E:\git\others\planka\server\node_modules\pg\lib\connection.js:115:12 at Parser.parse (E:\git\others\planka\server\node_modules\pg-protocol\dist\parser.js:40:17) { code: 'ERR_INVALID_ARG_TYPE' } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! planka-server@ db:init: `node db/init.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the planka-server@ db:init script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\jingzhou\AppData\Roaming\npm-cache\_logs\2021-03-25T04_44_27_486Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! planka@0.1.0 server:db:init: `npm run db:init --prefix server` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the planka@0.1.0 server:db:init script.
Author
Owner

@meltyshev commented on GitHub (Mar 25, 2021):

Never faced that before. According to https://github.com/brianc/node-postgres/issues/2371#issuecomment-706125467, you need to specify the password.

@meltyshev commented on GitHub (Mar 25, 2021): Never faced that before. According to https://github.com/brianc/node-postgres/issues/2371#issuecomment-706125467, you need to specify the password.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#84