Replies: 13 comments 59 replies
-
I'd be into this. Sure would simplify some things at my job. The key with pkg is having a good entry point, and another caveat worth mentioning is basically for anything that isn't a guaranteed static path, you must use Other than that, it ain't so bad. |
Beta Was this translation helpful? Give feedback.
-
sounds good , for example if pnpm would be bundled with node@14 and we run pnpm add and that package would require node16 . The context of which pnpm would be executing the add is node@14 add we would get an error for the installation that the node version is not good. |
Beta Was this translation helpful? Give feedback.
-
Just tried it. It seems to work. I bundled pnpm with a fork of pkg. Here's a WIP PR: #3444 I uploaded the linux artifact to get.pnpm.io: https://github.com/pnpm/get/tree/6be4bd15212a87cb527dd080510b721f3f556c2a/v6.3.0 Then I started a clean OS with no Node.js installed: Then I used these steps to install Node.js using pnpm:
Node.js was successfully installed. EDIT: the same with and install.sh that download the prebuilt tarball from the npm registry
EDIT 2: Using dnf package manager:
|
Beta Was this translation helpful? Give feedback.
-
Have you seen how the N works? out of all of the NVMs out there, this one is the cleanest and fastest. Binding yourself to the npm IMHO is not a smart choice, due to the high centralization of the platform. |
Beta Was this translation helpful? Give feedback.
-
Also, any symlinked packages ( I haven't had much success getting this feature to work, and often I will not upgrade Node's as regularly as I should because of this small friction.
|
Beta Was this translation helpful? Give feedback.
-
btw, do you have any plans about pnpm version management? I mean, something that will switch pnpm version for different projects? |
Beta Was this translation helpful? Give feedback.
-
Adding a new command for installing Node.js globally:
PR: #3620 |
Beta Was this translation helpful? Give feedback.
-
There is something I don't know how to handle. Currently there are some commands that pass through to the npm CLI (
cc @pnpm/collaborators Related issue: #3674 |
Beta Was this translation helpful? Give feedback.
-
@zkochan Using |
Beta Was this translation helpful? Give feedback.
-
Well...you are going to reinvent the wheel. |
Beta Was this translation helpful? Give feedback.
-
It's worth taking a look to the rest of the js ecosystem. At our workplace we use pnpm + turborepo. Starting with version 1.1, turborepo requires packageManager to be defined in This is confusing, on the one hand pnpm wants manage nodejs versions and the other hand nodejs wants manage pnpm versions. As a js developer I want to specify which are the dependencies required by my package after installation and for this I use dependencies. This is insufficient because my package also depends on a nodejs version-range (and possibly on a specific package manager too) but I cannot change that during installation. Luckily the engines entry in Managing requirements during development is more complex. Even if my package already has declared some Ideally each development repository should have its own environment with its own version of nodejs and package manager. The question is, how should it be done? Notice that the development environment has to be bootstrapped from the shell. Let's explore the alternatives.
|
Beta Was this translation helpful? Give feedback.
-
Update: We can use pnpm as Node version manager, because yarn will use the global node. But you need to install pnpm via Original: Could we use both We use I use Node.js is preinstalled option to install pnpm, and it is installed in: When I switch to Node@16 via (I also tried testing it with |
Beta Was this translation helpful? Give feedback.
-
Deno now enhances its npm support (via |
Beta Was this translation helpful? Give feedback.
-
Currently pnpm need Node.js to be installed in order to be used. However, if we will bundle pnpm to an executable using pkg, we will be able to use pnpm without Node.js. If pnpm will run without Node.js preinstalled, then we can use pnpm for installing Node.js (Node.js is currently available as a npm package). Furthermore, we could use pnpm as a version manager for Node.js (like an alternative to nvs, nvm, volta).
Related pull requests:
pnpm exec
should use the right Node.js version #3477Related issues:
Beta Was this translation helpful? Give feedback.
All reactions