-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
15.8.1 build failure on cross-platform development teams or CI/Docker pipelines #15380
Comments
Can you try and add the native packages directly as dependencies in your package.json? Usually npm package managers will automatically install the optional dependencies based on criteria on those optional packages. And since you're running with Add these (or whatever platforms you need to support/build on) to your dev/dependencies in package.json
|
I'm experimenting with removing the I had to make sure these weren't packages that had an associated binary, as that would also fail in our environments due to firewall rules (they install after testing). Question... will these dependencies be updated along with the rest when doing a |
actually, I dont think adding them as deps will help because package managers check the cpu architecture.. let me think of something |
hmm, it looks like removing |
yeah, removing |
Experiencing a similar problem since the new update, but I don't have a --ignore-optional flag.. Getting the following error: \?\C:\builds\kixomatic\kixomatic\node_modules@nrwl\nx-win32-x64-msvc\nx.win32-x64-msvc.node Any suggestions to solve this? |
@LongLiveCHIEF I'm going to update the docs to mention how to opt out of the native code implementations. @ertl can you provide more information on your environment? What version of Windows, how are you building it? |
@ertl also might be helpful to report what terminal you run your commands in (git bash/mingw i'm guessing?). I have a hunch for this one due to how node operates on windows. |
@Cammisuli The build runs in a windows docker image (mcr.microsoft.com/windows/servercore:20H2) in a gitlab CI/CD Pipeline. The Image uses the latest Node 16 Version with the cmd.exe as terminal As package manager we use npm |
@Cammisuli @LongLiveCHIEF: looks like setting NX_NON_NATIVE_HASHER=true fixes my problem |
Hi, I have a similar problem
|
I was able to fix this by adding |
Thank you @arrocke !
I am adding @Cammisuli is this a temporary fix or something that shall stay? |
We shouldn't have to manually add optional dependencies to the main package.json. Those are already set in the nx package What's the version of npm being used? |
All right, thank you for your answer.
BTW: you shall be able to replicate it by using docker with the following image:
|
@pavelbinar it appears to be working for me.. Here's what I did to build the image Then connecting to the instance, I can see the right packages in the @nrwl namespace in node_modules |
Thank you, @Cammisuli for trying to resolve this problem! here is the content of
BTW: I tried to delete |
@pavelbinar the native packages should be under Here's my output using the same command as you (with the ls pointint to
The sha's are mostly the same other then the actual workspace details. Is there a way for me to pull the workspace to take a look? |
As requested here this is our package.json :
|
@tamaserdfalvi nothing stands out to me with your package.json. What does your bitbucket flow look like? I really want to know how node_modules gets installed, and with what command. And if possible could you do a |
The pipeline is pretty complex, but this can be replicated anytime even with this simple step :
It does NOT make difference if we're not using our own runners, but bitbucket's own, I've tried it. |
@tamaserdfalvi whats the version of node and npm for that instance? |
We're using the image cypress/base:18.14.1 which has Node 18.14.1 |
|
Hi, same problem here with |
@harmoney-franck could you please try
Your issue is most likely related to npm/cli#4828 |
It seems to work with this image, but still getting the error in the console |
@harmoney-franck what kind of error, do you have any messages or screenshot? |
@Brooooooklyn warnings not errors sorry |
@harmoney-franck your warning was from next.js, not the |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
dependency installs fails due to inability to find module
'@nrwl/nx-linux-x64-musl'
in docker containers/pipelines.Expected Behavior
Nx projects should install and build with same dependencies locally as in pipeline containers so dependencies can be frozen for change control/auditing purposes.
GitHub Repo
No response
Steps to Reproduce
yarn install --ignore-optional --ignore-scripts --silent --frozen-lockfile
in a docker containerNx Report
Failure Logs
Additional Information
This is probably related to the implementation of #15071, and may be a documentation issue, (no documentation was added for the
I am going to try setting
NX_NON_NATIVE_HASHER=true
in my docker/builds to see if this fixes, but i think there was a step missing in the design considerations for this feature.The text was updated successfully, but these errors were encountered: