Skip to content
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

Force install recreates node_modules unexpectedly (e.g. pnpm i -S dedent --force) #674

Open
vjpr opened this issue Mar 21, 2017 · 4 comments
Assignees

Comments

@vjpr
Copy link
Contributor

vjpr commented Mar 21, 2017

 WARN using --force I sure hope you know what you are doing
  Recreating /Users/Vaughan/dev-live/shipmate/node_modules
  WARN Ignoring not compatible shrinkwrap file at /Users/Vaughan/dev-live/shipmate/shrinkwrap.yaml
  dedent                                                            0.7.0 ✓

I was caught off-guard by this.

I think the message should be expanded to tell the user they will need to run npm install again, and it should be more prominent.

@vjpr vjpr changed the title Force install recreates node_modules unexpectedly - pnpm i -S dedent --force Force install recreates node_modules unexpectedly (i.e. pnpm i -S dedent --force) Mar 21, 2017
@vjpr vjpr changed the title Force install recreates node_modules unexpectedly (i.e. pnpm i -S dedent --force) Force install recreates node_modules unexpectedly (e.g. pnpm i -S dedent --force) Mar 21, 2017
@vjpr
Copy link
Contributor Author

vjpr commented Mar 21, 2017

Also, it will delete any npm linked symlinks which is bad because if you can't remember what you had linked, it could take ages to work out which ones were linked.

This happens when the shrinkwrap version changes.

@vjpr
Copy link
Contributor Author

vjpr commented Mar 21, 2017

 ERROR The current version of pnpm is not compatible with the available node_modules structure
node_modules path: /Users/Vaughan/nvm/versions/node/v6.5.0/bin/pnpm-global/node_modules

Try running the same command with the --force parameter.

Information about the node_modules structure is stored in a node_modules/.shrinkwrap.yaml file instead of a node_modules/.graph.yaml file

Related PR: https://github.com/pnpm/pnpm/pull/660

Also, when running pnpm link -g, it will trash your global node_modules which could cause a lot of problems. It would be better to warn the user more.

@zkochan
Copy link
Member

zkochan commented Apr 5, 2017

  • We can make pnpm i -f keep the symlinked dependencies and remove everything else
  • We can force to run pnpm i w/o parameters when the node_modules structure has to be recreated. In that case it would have to be pnpm i -f && pnpm i dedent

By the way, you can skip the -S parameter. Packages are added to dependencies by default (unlike with npm)

@zkochan
Copy link
Member

zkochan commented Apr 6, 2017

Oh, sorry, I didn't look into the global installation issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants