Git Product home page Git Product logo

Comments (6)

zkochan avatar zkochan commented on May 27, 2024 2

The Node version issue was probably fixed by #7801

For the other issue with ENOENT: no such file or directory, open it would help to have some steps to reproduce. It is a serious issue if it happens but I assume it is hard to reproduce as I don't remember getting it.

from pnpm.

CaptainN avatar CaptainN commented on May 27, 2024

yeah, uninstall, reinstall, and now I get this:

❯ node -v
v20.11.1
❯ pnpm i
Scope: all 3 workspace projects
Already up to date
/Users/kevin.newman/repos/OHI/storybook:
 ERR_PNPM_UNSUPPORTED_ENGINE  Unsupported environment (bad pnpm and/or Node.js version)

Your Node version is incompatible with "/next/14.0.0(@babel/[email protected])([email protected])([email protected])([email protected])".

Expected version: >=18.17.0
Got: v18.5.0

This is happening because the package's manifest has an engines.node field specified.
To fix this issue, install the required Node version.
❯ pnpm node -v
v20.11.1

I haven't changed the node version at all. Does pnpm just not work with nvm? Maybe that should be noted somewhere.

from pnpm.

CaptainN avatar CaptainN commented on May 27, 2024

I was able to resolve the initial error by just forcing pnpm to use a different directory (pnpm config set store-dir /path/to/.pnpm-store) - but there are issues here:

  • Uninstalling following the instructions seems to not actually reset enough to scratch to let this work out of the box
  • Out of the box, I was still getting that baffling error
  • Why can't pnpm keep track of the active node version? (this is an issue even when using pnpm to manage node versions, which is what I usually do)

from pnpm.

shalldie avatar shalldie commented on May 27, 2024

I met the same case

ENOENT: no such file or directory, open '.........-index.json'

macOS: 14.4 (23E214)
node: v20.11.1
pnpm: 8.15.4

I tried npm install pnpm -g and brew install pnpm, change the store-dir, the error is still there.
I use fnm to manage node.

from pnpm.

shalldie avatar shalldie commented on May 27, 2024

My ultimate solution is this:


Remove all node_modules in this monorepo project.
Not use glob such as rm -rf **/*/node_modules !!
Find every directory , and rm -rf ./node_modules one by one.


I don't know why, when after glob remove, I've checked every directory, I can make sure there's no node_modules, but it's broken.
When rm -rf ./node_modules one by one, it works 😂😂

I think it's caused by caching, when after pnpm store prune or change the store-dir.

from pnpm.

CaptainN avatar CaptainN commented on May 27, 2024

It's challenging to create a reproduction for this, since I'm not entirely sure what causes it. I just know that when it gets in to that state, the move is to either uninstall and reinstall pnpm, or to create a new store somewhere new.

I do recall I never had this trouble before trying to use nvm (I generally use pnpm for version switching, because it's about a billion times faster than nvm), which I only needed for very very old version of node (12/14), on rare occasion. Removing nvm doesn't resolve it. Whatever nvm does, it messes things up for good. I don't say this with any confidence.

from pnpm.

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.