Closed BeBo1337 closed 8 months ago
bump?
Rip. I guess nobody on the internet knows how to use NX
sorry for the delayed response! Based on the screenshot, are you running your application through Nx? (I see nx run wolverine:serve:development
, but in your steps in the dockefile, I only see build)
Can you make sure that the working directory that where you're running the serve has a node_modules/@nx/nx-linux-*
directory.
Yes, the nx run wolverine:serve:development
command is run on the docker-compose file. I thought asking about a specific microservice might help ease the problem since this problem happenes on every docker container I have....
And yes the directory is on every docker container before it runs the command, yet it still happens.
Can you create a test.js file that has this content:
console.log(
require('child_process').execSync(
'find node_modules -name "*.node" | grep -E "(@nx|@nrwl)" ',
{ encoding: 'utf8' }
)
);
console.log(require('nx/src/native').hashArray(['hello']));
Put that in your docker image, and run it with node test.js
in the exact same directory that you would run the nx command. Then can you give me the output?
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏
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
Like the title states I am receiving the following error message...
In short...I am trying to have some tests on a server(wolverine) that I have written using NestJS, when trying to run
docker-compose up wolverine
the image and container seem to finish building but then I get: NX Missing Platform Dependency The Nx CLI could not find or load the native binary for your supported platform (linux-x64)I am using nx v17.2.8 if this is at all relevant...
I have exhausted all the suggestions in the troubleshooting LINK that is attached to the error message.
-Tried deleting node_modules and package-lock.json and running npm install
-Made sure I installed the most recent version of Microsoft Visual C++ Redistributable
-"Confirm that you see @nx/nx-plaform-arch in your node_modules folder (e.g. @nx/nx-darwin-arm64, @nx/nx-win32-x64-msvc, etc).":
On my docker desktop my docker builder is desktop-linux and I have both of the linux-platform-architectures installed on nx
here is my docker file:
`FROM node:18.16.1-alpine as builder
WORKDIR /home/node
COPY package*.json /home/node/
RUN npm install
COPY . /home/node/
RUN npm run build wolverine
FROM node:18.16.1-alpine as wolverine
WORKDIR /home/app
COPY --from=builder /home/node/dist/apps/wolverine/package*.json /home/app/
COPY --from=builder /home/node/dist/ /home/app/dist/
RUN npm ci --ignore-scripts
RUN apk --no-cache add curl
CMD ["sh", "-c", "node dist/apps/wolverine/main.js"]`
I am really at a lost here to what might cause this issue... Thanks in advance.
Expected Behavior
Expecting it to not get this error and start listening to the configured port.
GitHub Repo
No response
Steps to Reproduce
1.
Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
No response