Giter VIP home page Giter VIP logo

Comments (5)

Wurielle avatar Wurielle commented on July 3, 2024 1

Having this issue on Windows 10 as well.

The file does exist in C:\Users\user\AppData\Local\Temp\nx-native-file-cache-41edfcf\19.1.0-nx.win32-x64-msvc.node but it seems like nx adds \\?\ in front of the path it's trying to load just like in the error above:
npm ERR! \\?\C:\Users\user\AppData\Local\Temp\nx-native-file-cache-41edfcf\19.1.0-nx.win32-x64-msvc.node

Setting NX_NATIVE_FILE_CACHE_DIRECTORY = "/tmp/mycache" in my env variable will result in the same issue:
npm ERR! \\?\C:\tmp\mycache\AppData\Local\Temp\nx-native-file-cache-41edfcf\19.1.0-nx.win32-x64-msvc.node

I tried to downgrade the version of nx to 18.3.4 as well but the same issue occurs so I'm assuming it's not new.

from nx.

MaxKless avatar MaxKless commented on July 3, 2024 1

Hey! For now it should be possible to set the NX_NATIVE_FILE_CACHE_DIRECTORY variable to something else.
Can you check whether it works for you if you specify an absolute path there?
I don't think the \\? is the issue, it looks like that's just how windows specifies potentially very long paths.

The module loading error is a bit of a misdirect I think as it shadows the true, underlying error. In this case this is ERR_DLOPEN_FAILED which I've never heard of before. @Wurielle do you get the same stack trace with ERR_DLOPEN_FAILED? Does the error code change if you specify NX_NATIVE_FILE_CACHE_DIRECTORY? Since it's in 18.3.4, it sounds like it might be a different issue.

@JohnMichaelangelo20 can you make sure that when you try to npm i nx -g, there are no other processes that might somehow use nx (vscode, intellij, daemon,...) running at the same time? It would give me more information. Thank you :)

from nx.

JohnMichaelangelo20 avatar JohnMichaelangelo20 commented on July 3, 2024

Hey! For now it should be possible to set the NX_NATIVE_FILE_CACHE_DIRECTORY variable to something else. Can you check whether it works for you if you specify an absolute path there? I don't think the \\? is the issue, it looks like that's just how windows specifies potentially very long paths.

The module loading error is a bit of a misdirect I think as it shadows the true, underlying error. In this case this is ERR_DLOPEN_FAILED which I've never heard of before. @Wurielle do you get the same stack trace with ERR_DLOPEN_FAILED? Does the error code change if you specify NX_NATIVE_FILE_CACHE_DIRECTORY? Since it's in 18.3.4, it sounds like it might be a different issue.

@JohnMichaelangelo20 can you make sure that when you try to npm i nx -g, there are no other processes that might somehow use nx (vscode, intellij, daemon,...) running at the same time? It would give me more information. Thank you :)

I did run the command without anything being opened. I also just reformat my whole device and the very first I did was to install node and install nx and the error occurs from the beggining even if it's a fresh device.

from nx.

MaxKless avatar MaxKless commented on July 3, 2024

is there anything else that might be special about your machine? multiple users, permissions? Have you tried setting the 'NX_NATIVE_FILE_CACHE_DIRECTORY' environment variable to another place that you surely have access to?
I've tried reproducing and on my windows machine it installs just fine... So I need some more information. Can you trace it to an exact version where it worked before? Maybe you can record a video of it happening?

from nx.

JohnMichaelangelo20 avatar JohnMichaelangelo20 commented on July 3, 2024

Hi @MaxKless 👋🏼 No, there is nothing special on my machine.

But npm i nx -g was working when it was on windows 11 and had to downgrade it to windows 10 but since then I got this error (here is what I download https://www.microsoft.com/en-us/software-download/windows10)

This is what I followed https://www.youtube.com/watch?v=hnBO1aTgrVs

and I tried to install & uninstall node js got this pop up with different .msi each time I'm installing node that needed to be yes

Do you want to allow this app to make changes to your device?

8e80.msi` / 968e.msi / 9e9c.msi / 27e0f.msi

Multiple Users
image

User Permission
image

What is installed in my device (nvm is only here because I tried to install nx and have removed node js but same error; I tried install nx via node downloaded from nvm and node is uninstall and vice versa, same error 😟 )
image

Windows C: Security settings
image

Do I need something to be enabled/checked here?
image

from nx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.