GithubHelp home page GithubHelp logo

Comments (5)

simmy-reach88 avatar simmy-reach88 commented on July 17, 2024 3

@vpernjek - Did you check in the /var folder?
I was facing the same issue and I removed the nx-native-file-cache files from the /var folder in macOs (This is linked to /private/var) (also remove if any package-lock, node_modules, .nx folder if exists) :

so in your case, the path should be

cd /var/folders/4t/pyry0n8510n6prglnzqb9knr0000gn/T/
rm -r nx-native-file-cache-79bc8ab
npm i

This hopefully should work.

from nx.

mhoffman-bain avatar mhoffman-bain commented on July 17, 2024 2

I have found a solution to this issue, at least for myself on windows.

I tried a bunch of things, including restarting my computer, deleting the node_modules folder, deleting the .nx folder, downgrading back to node 18, but none of that worked.

What did work was to go into the AppData\Local\Temp\ folder and delete the nx-native-file-cache-79bc8ab folder. I initially was not able to delete this folder due to it being in use, despite vs code and all command prompts being closed. In task manager, it looks like there was a node process left running from a previous install that was sitting in the background despite the command prompt having been closed. After terminating this node process, I was able to delete the nx file cache folder. After deleting this folder, I was able to successfully run npm install nx 19.3.2 and node 20.15.0.

from nx.

MaxKless avatar MaxKless commented on July 17, 2024 1

Thanks everyone for the input :) If anything happens in the future, you can also try redefining the NX_NATIVE_FILE_CACHE_DIRECTORY env variable to point to a different location without permission problems.

from nx.

mhoffman-bain avatar mhoffman-bain commented on July 17, 2024

I am seeing a similar error on windows.

npm error path C:\<PROJECT-NAME>\node_modules\nx
npm error command failed
npm error command C:\WINDOWS\system32\cmd.exe /d /s /c node ./bin/post-install
npm error C:\<PROJECT-NAME>\node_modules\nx\src\native\native-bindings.js:244
npm error     throw loadError
npm error     ^
npm error
npm error Error: \\?\C:\Users\<USERNAME>\AppData\Local\Temp\nx-native-file-cache-79bc8ab\19.3.2-nx.win32-x64-msvc.node is not a valid Win32 application.
npm error \\?\C:\Users\<USERNAME>\AppData\Local\Temp\nx-native-file-cache-79bc8ab\19.3.2-nx.win32-x64-msvc.node
npm error     at Module._extensions..node (node:internal/modules/cjs/loader:1465:18)
npm error     at Module.load (node:internal/modules/cjs/loader:1206:32)
npm error     at Module._load (node:internal/modules/cjs/loader:1022:12)
npm error     at Module._load (C:\<PROJECT-NAME>\node_modules\nx\src\native\index.js:60:27)
npm error     at Module.require (node:internal/modules/cjs/loader:1231:19)
npm error     at require (node:internal/modules/helpers:179:18)
npm error     at Object.<anonymous> (C:\<PROJECT-NAME>\node_modules\nx\src\native\native-bindings.js:66:29)
npm error     at Module._compile (node:internal/modules/cjs/loader:1369:14)
npm error     at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
npm error     at Module.load (node:internal/modules/cjs/loader:1206:32) {
npm error   code: 'ERR_DLOPEN_FAILED'
npm error }
npm error
npm error Node.js v20.12.2
npm error A complete log of this run can be found in: C:\Users\<USERNAME>\AppData\Local\npm-cache\_logs\2024-07-01T15_05_49_081Z-debug-0.log

I recently updated nx from 17 to 19, and updated node from 18 to 20.

from nx.

vpernjek avatar vpernjek commented on July 17, 2024

I am not seeing nx-native-file-cache-36db5b1 folder anywhere on macOS unfortunately..

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.