Skip to content

fix shrinkwrap file - #2424

Merged
joshaber merged 2 commits into
masterfrom
fix-shrinkwrap-file
Aug 9, 2017
Merged

joshaber merged 2 commits into
masterfrom
fix-shrinkwrap-file

Conversation

@shiftkey

@shiftkey shiftkey commented Aug 9, 2017

Copy link
Copy Markdown
Member

Currently, if you want to try and add a new dependency to app/package.json, you'll see this output:

$ npm install --save app-path
npm WARN saveError Problems were encountered
npm WARN saveError Please correct and try again.
npm WARN saveError missing: react@^15.6.1, required by [email protected]
npm WARN saveError missing: react-addons-shallow-compare@^15.6.0, required by [email protected]
npm WARN saveError missing: [email protected], required by [email protected]
npm WARN saveError missing: [email protected], required by [email protected]
npm WARN saveError missing: [email protected], required by [email protected]
npm WARN saveError peer invalid: react-dom@^15.4.2, required by [email protected]
[email protected] /Users/shiftkey/src/desktop/desktop/app
└── [email protected] 

npm WARN [email protected] requires a peer of react-dom@^15.4.2 but none was installed.

While this looks terrifying, it's just due to #2124 (and my fault, basically). However it won't actually update your shrinkwrap file, so the app won't work at runtime in many cases as it doesn't see your new dependency.

To fix this, you just need to re-add those versions:

$ npm install --save [email protected] 
$ npm install --save [email protected]
$ npm install --save [email protected]
$ npm install --save [email protected]
$ npm install --save [email protected]

And on that last one, you'll see the shrinkwrap file is updated:

$ npm install --save [email protected]
wrote npm-shrinkwrap.json
[email protected] /Users/shiftkey/src/desktop/desktop/app
└── [email protected] 

@j-f1 you might need this as part of #2372

@shiftkey shiftkey added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Aug 9, 2017
@joshaber joshaber self-assigned this Aug 9, 2017

@joshaber joshaber left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙈

@joshaber
joshaber merged commit 86af651 into master Aug 9, 2017
@joshaber
joshaber deleted the fix-shrinkwrap-file branch August 9, 2017 14:25
@joshaber joshaber mentioned this pull request Sep 19, 2017
10 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants