Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Install pkcs11js #59

Open
Swhite215 opened this issue May 19, 2020 · 4 comments
Open

Unable to Install pkcs11js #59

Swhite215 opened this issue May 19, 2020 · 4 comments
Assignees

Comments

@Swhite215
Copy link

Node Version: 12.16.3
NPM Version: 6.14.4

I am getting this error when running npm install in my project directory. Is this an issue with my node version?

verbose stack Error: [email protected] install: `node-gyp rebuild`
8341 verbose stack Exit status 1
8341 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
8341 verbose stack     at EventEmitter.emit (events.js:310:20)
8341 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
8341 verbose stack     at ChildProcess.emit (events.js:310:20)
8341 verbose stack     at maybeClose (internal/child_process.js:1021:16)
8341 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
8342 verbose pkgid [email protected]
8343 verbose cwd /PATH/PATH/PATH
8344 verbose Darwin 19.3.0
8345 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "i"
8346 verbose node v12.16.3
8347 verbose npm  v6.14.4
8348 error code ELIFECYCLE
8349 error errno 1
8350 error [email protected] install: `node-gyp rebuild`
8350 error Exit status 1
8351 error Failed at the [email protected] install script.
@microshine
Copy link
Contributor

@Swhite215 Do you have a log file? It's not clear why you've got that error

I've got a test result. It works fine for me

npm i pkcs11js

> [email protected] install /private/tmp/p11-test/node_modules/pkcs11js
> node-gyp rebuild

  CXX(target) Release/obj.target/pkcs11/src/main.o
Apple clang version 11.0.3 (clang-1103.0.32.62)
Target: x86_64-apple-darwin19.4.0
...
End of search list.
  SOLINK_MODULE(target) Release/pkcs11.node
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

+ [email protected]
added 2 packages from 9 contributors and audited 2 packages in 25.696s
found 0 vulnerabilities

Versions

Node: v12.16.3
Npm: 6.14.4

@anonymousdplantgit
Copy link

anonymousdplantgit commented Nov 17, 2020

I am getting this error when running npm install in my project directory, do you have any idea what causes this?

Node: v10.15.3
Npm: 6.4.1

npm i pkcs11js
temp\Desktop\eid\eid-reader-angular\node_modules\pkcs11js>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: unable to verify the first certificate
gyp ERR! stack     at TLSSocket.onConnectSecure (_tls_wrap.js:1051:34)
gyp ERR! stack     at TLSSocket.emit (events.js:189:13)
gyp ERR! stack     at TLSSocket._finishInit (_tls_wrap.js:633:8)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd temp\node_modules\pkcs11js
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

@donskov
Copy link

donskov commented Nov 18, 2020

Hello @anonymousdplantgit . Try to use nodejs/node-gyp#1587 (comment)

@microshine
Copy link
Contributor

Strange error from the log Error: unable to verify the first certificate.

Try to disable certificate validation using NODE_TLS_REJECT_UNAUTHORIZED environment variable

set NODE_TLS_REJECT_UNAUTHORIZED=0
npm install pkcs11js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants