asmcrypto / asmcrypto.js

JavaScript Cryptographic Library with performance in mind.
MIT License
659 stars 182 forks source link

Doesn't work with Node 12 #178

Closed seisvelas closed 3 years ago

seisvelas commented 3 years ago

I can use this library fine with Node 8 & 10, but with Node 12 this happens:

alex@laptop:~/git/flowcrypt-account$ nvm use 12
Now using node v12.18.4 (npm v6.14.6)
alex@laptop:~/git/flowcrypt-account$ npm install asmcrypto.js@2.3.2
npm ERR! prepareGitDep 1> 
npm ERR! prepareGitDep > asmcrypto.js@2.3.2 prepare /home/alex/.npm/_cacache/tmp/git-clone-f554d507
npm ERR! prepareGitDep > node -r esm build.js
npm ERR! prepareGitDep 
npm ERR! prepareGitDep 
npm ERR! prepareGitDep 2> npm WARN install Usage of the `--dev` option is deprecated. Use `--only=dev` instead.
npm ERR! prepareGitDep file:///home/alex/.npm/_cacache/tmp/git-clone-f554d507/build.js:1
npm ERR! prepareGitDep SyntaxError: Error parsing /home/alex/.npm/_cacache/tmp/git-clone-f554d507/node_modules/fs-extra/package.json: Unexpected token , in JSON at position 2553
npm ERR! prepareGitDep     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10) {
npm ERR! prepareGitDep   path: '/home/alex/.npm/_cacache/tmp/git-clone-f554d507/node_modules/fs-extra/package.json'
npm ERR! prepareGitDep }
npm ERR! prepareGitDep npm ERR! code ELIFECYCLE
npm ERR! prepareGitDep npm ERR! errno 1
npm ERR! prepareGitDep npm ERR! asmcrypto.js@2.3.2 prepare: `node -r esm build.js`
npm ERR! prepareGitDep npm ERR! Exit status 1
npm ERR! prepareGitDep npm ERR! 
npm ERR! prepareGitDep npm ERR! Failed at the asmcrypto.js@2.3.2 prepare script.
npm ERR! prepareGitDep npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! prepareGitDep 
npm ERR! prepareGitDep npm ERR! A complete log of this run can be found in:
npm ERR! prepareGitDep npm ERR!     /home/alex/.npm/_logs/2020-09-24T00_46_53_594Z-debug.log
npm ERR! prepareGitDep 
npm WARN flowcrypt-account@0.0.1 No repository field.
npm WARN flowcrypt-account@0.0.1 license should be a valid SPDX license expression

npm ERR! premature close

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/alex/.npm/_logs/2020-09-24T00_46_54_585Z-debug.log

Not sure if anyone is still actively working on asmcrypto.js, but just in case thought I should make y'all aware of this :)

torgeir commented 3 years ago

This is still an issue today when stuff depends on asmcrypto

~/C/s/saga/.github/actions master *1 ?1 ❯ npm cache clean --force                                        15.8.0 10:29:17
❯ npm cache clean --force
npm WARN using --force Recommended protections disabled.

~/C/s/saga/.github/actions master *1 ?1 ❯                                                                15.8.0 10:29:27
❯ rm -rf node_modules
❯ npm install
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command /Users/Torgeir/.nvm/versions/node/v15.8.0/bin/node /Users/Torgeir/.nvm/versions/node/v15.8.0/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/Users/Torgeir/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm ERR! code 1
npm ERR! npm ERR! git dep preparation failed
npm ERR! npm ERR! command /Users/Torgeir/.nvm/versions/node/v15.8.0/bin/node /Users/Torgeir/.nvm/versions/node/v15.8.0/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/Users/Torgeir/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit
npm ERR! npm ERR! > asmcrypto.js@2.3.2 prepare
npm ERR! npm ERR! > node -r esm build.js
npm ERR! npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm ERR! file:///Users/Torgeir/.npm/_cacache/tmp/git-clone-f761f5df/build.js:1
npm ERR! npm ERR! SyntaxError: Error parsing /Users/Torgeir/.npm/_cacache/tmp/git-clone-f761f5df/node_modules/fs-extra/package.json: Unexpected token , in JSON at position 1631
npm ERR! npm ERR!     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10) {
npm ERR! npm ERR!   path: '/Users/Torgeir/.npm/_cacache/tmp/git-clone-f761f5df/node_modules/fs-extra/package.json'
npm ERR! npm ERR! }
npm ERR! npm ERR! npm ERR! code 1
npm ERR! npm ERR! npm ERR! path /Users/Torgeir/.npm/_cacache/tmp/git-clone-f761f5df
npm ERR! npm ERR! npm ERR! command failed
npm ERR! npm ERR! npm ERR! command sh -c node -r esm build.js
npm ERR! npm ERR!
npm ERR! npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! npm ERR!     /Users/Torgeir/.npm/_logs/2021-02-16T09_30_06_584Z-debug.log
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR!     /Users/Torgeir/.npm/_logs/2021-02-16T09_30_31_207Z-debug.log

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/Torgeir/.npm/_logs/2021-02-16T09_30_33_685Z-debug.log

❯ node -v; npm -v
v15.8.0
7.5.4
torgeir commented 3 years ago

I retract my previous statement, the issue resides in https://github.com/openpgpjs/asmcrypto.js.