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

Cannot build anymore from yesterday: Cannot find module './**/*' #385

Closed
Kliton opened this issue Aug 28, 2023 · 8 comments
Closed

Cannot build anymore from yesterday: Cannot find module './**/*' #385

Kliton opened this issue Aug 28, 2023 · 8 comments

Comments

@Kliton
Copy link

Kliton commented Aug 28, 2023

Hi,
since yesterday all my projects that contains node2-argon cannot build.

Error that i got:
#23 9.755 Error: Cannot find module './**/*'
#23 9.755 Require stack:
#23 9.755 - /app/node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js
#23 9.755 - /app/node_modules/argon2/argon2.js

I've also tried upgrading argon to 0.31.0 but the problem is still there.

@ralvare
Copy link

ralvare commented Aug 29, 2023

I think I have the same problem. I am not sure if it is only happening on Macbooks with M1 CPU because it doesn't fail to install when we run npm install in a docker alpine image and the containers runs correctly.

node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! install response status 404 Not Found on https://github.com/ranisalt/node-argon2/releases/download/v0.28.2/argon2-v0.28.2-napi-v3-darwin-arm64-unknown.tar.gz 
node-pre-gyp WARN Pre-built binaries not installable for argon2@0.28.2 and node@14.21.3 (node-v83 ABI, unknown) (falling back to source compile with node-gyp) 
node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/ranisalt/node-argon2/releases/download/v0.28.2/argon2-v0.28.2-napi-v3-darwin-arm64-unknown.tar.gz 
  CC(target) Release/obj.target/libargon2/argon2/src/ref.o
  CC(target) Release/obj.target/libargon2/argon2/src/argon2.o
  CC(target) Release/obj.target/libargon2/argon2/src/core.o
  CC(target) Release/obj.target/libargon2/argon2/src/blake2/blake2b.o
  CC(target) Release/obj.target/libargon2/argon2/src/thread.o
  CC(target) Release/obj.target/libargon2/argon2/src/encoding.o
  LIBTOOL-STATIC Release/argon2.a
  CXX(target) Release/obj.target/argon2/src/argon2_node.o
  SOLINK_MODULE(target) Release/argon2.node
  COPY /Users/robertoalvarez/Documents/Paystand/DeFi-Card/be-virtualcard/node_modules/argon2/lib/binding/napi-v3/argon2.node
  TOUCH Release/obj.target/action_after_build.stamp```

@jonrh
Copy link

jonrh commented Aug 31, 2023

Same here. On npm install / npm install argon2 a fetch for the pre-built binaries seems to fail on a 404 Not Found:

npm ERR! node-pre-gyp http GET https://github.com/ranisalt/node-argon2/releases/download/v0.31.0/argon2-v0.31.0-napi-v3-darwin-arm64-unknown.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/ranisalt/node-argon2/releases/download/v0.31.0/argon2-v0.31.0-napi-v3-darwin-arm64-unknown.tar.gz 
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for argon2@0.31.0 and node@18.17.1 (node-v108 ABI, unknown) (falling back to source compile with node-gyp) 
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/ranisalt/node-argon2/releases/download/v0.31.0/argon2-v0.31.0-napi-v3-darwin-arm64-unknown.tar.gz 

Running on Apple Silicon, macOS 13.4.1. The script seems to attempt to fetch https://github.com/ranisalt/node-argon2/releases/download/v0.31.0/argon2-v0.31.0-napi-v3-darwin-arm64-unknown.tar.gz but in the GitHub releases for v0.31.0 the file name is https://github.com/ranisalt/node-argon2/releases/download/v0.31.0/argon2-v0.31.0-napi-v3-darwin-x64-unknown.tar.gz. The script attempts "arm64" as an architecture but the prebuilt binary seems to expect "x64".

@jonrh
Copy link

jonrh commented Sep 7, 2023

On a closer look it seems that in commit 51d8364 macos-m1 was removed as an extra release target. Maybe on accident.

# .github/workflows/release.yml
-        include:
-           - node-version: 16
-             os: macos-m1

Pre-built binaries were being published for macOS arm64 (Apple silicon) from v0.29.0 up until v0.30.3 but has been missing since v0.31.0. Have been tinkering around on a private fork but can not get the release pipline to run without some other unrelated issue. I suspect it can be fixed by adding macos-m1 as an OS to line 39 in .github/workflows/release.yml:

- os: [ubuntu-20.04, macos-11, windows-2019]
+ os: [ubuntu-20.04, macos-11, macos-m1, windows-2019]

On another note I would like to apolagize that this comment and my previous one are likely not related to the issue of the original submitter. Please let me know if a seperate issue should be created.

@ranisalt
Copy link
Owner

ranisalt commented Sep 7, 2023

@jonrh that's right, it was not intentional. Feel free to open a PR!

@ranisalt
Copy link
Owner

Should be fixed on the latest release 0.31.2

@Eriickson
Copy link

Same problem :(

@ranisalt
Copy link
Owner

Alpha versions released under the next tag will not have issues with missing binary downloads. You can try it by installing argon2@next with your preferred package manager, the rest of the library remains the same

@ranisalt
Copy link
Owner

Should be fixed with v0.40.1

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

5 participants