vercel / nft

Node.js dependency tracing utility
https://npmjs.com/@vercel/nft
MIT License
1.31k stars 136 forks source link

Add support for `argon2` #45

Closed styfle closed 5 years ago

styfle commented 5 years ago

This integration test fails:

const argon2 = require('argon2');
console.log('argon is ' + typeof argon2);

Error

/private/var/folders/v7/6kzxdgb93x328tk9pg633s200000gn/T/node-file-trace-2963026860021942/node_modules/node-gyp-build/index.js:56
  throw new Error('No native build was found for ' + target)
  ^

Error: No native build was found for platform=darwin arch=x64 runtime=node abi=64 uv=1 libc=glibc
    at Function.load.path (/private/var/folders/v7/6kzxdgb93x328tk9pg633s200000gn/T/node-file-trace-2963026860021942/node_modules/node-gyp-build/index.js:56:9)
    at load (/private/var/folders/v7/6kzxdgb93x328tk9pg633s200000gn/T/node-file-trace-2963026860021942/node_modules/node-gyp-build/index.js:20:30)
    at Object.<anonymous> (/private/var/folders/v7/6kzxdgb93x328tk9pg633s200000gn/T/node-file-trace-2963026860021942/node_modules/argon2/argon2.js:5:81)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787: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 Module.require (internal/modules/cjs/loader.js:690:17)
    at require (internal/modules/cjs/helpers.js:25:18)

Related to https://github.com/zeit/now-builders/issues/929

This is likely an issue with argon2's dependency node-gyp-build (related to #1) which will likely have to be special cased.

hoangvvo commented 5 years ago

Hey @styfle, any ETA for this? Been trying to deployed with Now for a month now... Would love to see it available soon. Thank you for your work.

styfle commented 5 years ago

Fixed in #53 and shipping to @now/node in this PR https://github.com/zeit/now-builders/pull/947

nohren commented 3 years ago

This issue is still a problem in vercel. We got a cannot find module argon2 in vercel functions tab.

styfle commented 3 years ago

The previous fix was for argon 0.24.0 so maybe something changed in a newer version.

Can you create a new issue with the version of argon you're using?

nohren commented 3 years ago

Done https://github.com/vercel/nft/issues/183

bradley-us commented 4 months ago

Returning to "next": "^14.1.1" version worked for me.