-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v9.x
FAQ
#5844
Comments
Added items in the body of this issue for how to maintain lockfile compatibility with |
do we have any plan to support like |
@hutuyishi https://github.com/npm/rfcs/blob/main/accepted/0042-isolated-mode.md already exists for symlinks; i'm not sure if hard links are planned since they add a lot of complexity, especially across platforms. |
Is npm login still supported in v9.x? |
When will |
@yjhmelody that would be a bad idea prior to node supporting serializing and deserializing such a format. |
🎉
npm i npm -g
will now installnpm@9
🎉Breaking Changes
[email protected]
releaseMigration Guide
Installing symlinked local dependencies
npm@9
changed the default value ofinstall-links
fromfalse
totrue
.This means that npm will now attempt to install directories by default instead of symlinking them.
Note that workspaces will always be symlinked, so the latest workspaces changes will always be reflected in your package.
How to turn it off
You can run the following to set the previous behavior on a per-project basis:
Compatibility with
npm@6
npm@9
changed thelockfile-version
for new projects from2
to3
.If you are creating a new project and want to maintain compatibility with
npm@6
you will need to downgrade yourlockfile-version
to2
. Existing projects will not have theirlockfile-version
number changed.To set a project specific
lockfile-version
run:Known Issues
ENOENT
package.json
Errorsnpm@9
has changed the default of theinstall-links
flag totrue
. This means that when runningnpm install
with a directory as the argument (such asnpm install ../path/to/local-package
),npm
will attempt to install that directory into thenode_modules/
directory just like any other package, instead of creating a symlink like it would previously.We are tracking a fix (ref: #5820) for a known issue where transitive local directory dependencies can cause this error.
Workaround
To workaround this issue, run either of the following:
npm install --install-links=false
to run a single install that will create symlinksnpm config set install-links=false --location project
to set this as a default for your project in its local.npmrc file
Other Issues
If you find other issues with
v9
, use the Bug v9 Issue Template to open a new issue.The text was updated successfully, but these errors were encountered: