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

Unable to publish "peer dep missing" #11

Closed
Glavin001 opened this issue Mar 10, 2018 · 7 comments
Closed

Unable to publish "peer dep missing" #11

Glavin001 opened this issue Mar 10, 2018 · 7 comments

Comments

@Glavin001
Copy link
Member

Glavin001 commented Mar 10, 2018

Related to: npm/npm#19877 , npm/npm#15708 , yarnpkg/yarn#4850 , https://stackoverflow.com/a/48318878/2578205 , yarnpkg/yarn#4743 , yarnpkg/yarn#5088

❯ vsce publish
Executing prepublish script 'npm run vscode:prepublish'...

> unibeautify-vscode@0.1.0 vscode:prepublish /Users/glavin/Development/unibeautify/vscode
> npm run build


> unibeautify-vscode@0.1.0 build /Users/glavin/Development/unibeautify/vscode
> tsc

Error: Command failed: npm list --production --parseable --depth=99999
npm ERR! peer dep missing: unibeautify@^0.9.2, required by @unibeautify/beautifier-eslint@0.4.0
npm ERR! peer dep missing: unibeautify@^0.8.0, required by @unibeautify/beautifier-js-beautify@0.3.1
npm ERR! peer dep missing: unibeautify@^0.8.0, required by @unibeautify/beautifier-prettier@0.7.3
npm ERR! peer dep missing: unibeautify@^0.9.1, required by @unibeautify/beautifier-prettydiff@0.5.2

and

❯ npm install

> unibeautify-vscode@0.1.0 postinstall /Users/glavin/Development/unibeautify/vscode
> node ./node_modules/vscode/bin/install

Detected VS Code engine version: ^1.6.0
Found minimal version that qualifies engine range: 1.6.0
Fetching vscode.d.ts from: https://raw.githubusercontent.com/Microsoft/vscode/e52fb0bc87e6f5c8f144e172639891d8d8c9aa55/src/vs/vscode.d.ts
vscode.d.ts successfully installed!

npm WARN @unibeautify/beautifier-eslint@0.4.0 requires a peer of unibeautify@^0.9.2 but none is installed. You must install peer dependencies yourself.
npm WARN @unibeautify/beautifier-js-beautify@0.3.1 requires a peer of unibeautify@^0.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN @unibeautify/beautifier-prettier@0.7.3 requires a peer of unibeautify@^0.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN @unibeautify/beautifier-prettydiff@0.5.2 requires a peer of unibeautify@^0.9.1 but none is installed. You must install peer dependencies yourself.

up to date in 6.171s
@Glavin001
Copy link
Member Author

To reproduce without actually publishing run:

npm list --production --parseable --depth=99999

Help wanted! I am stuck here.

@tdillon
Copy link

tdillon commented Mar 14, 2018

Can you update the unibeautify dependency/peerDependency version in beautifier-eslint, beautifier-js-beautify, beautifier-prettier, and beautifier-prettydiff? I updated them to ^0.10.1 and npm list --production --parseable --depth=99999 did not error. Since the version of unibeautify you are depending on in unibeautify/vscode is 0.10.1 the peerDependencies in your beautifier-* projects must be at least ^0.10.0. See https://docs.npmjs.com/misc/semver

@Glavin001
Copy link
Member Author

Oh I see now: https://docs.npmjs.com/misc/semver#caret-ranges-123-025-004

this allows patch and minor updates for versions 1.0.0 and above, patch updates for versions 0.X >=0.1.0, and no updates for versions 0.0.X.

I had interpreted the semver range ^0.9.x as being the same as >= 0.9.x however this is only true when >=1.x.x and not when <= 0.x.x!

Instead of using ^ I think the beautifier-* packages should use Unibeautify range >= 0.9.x instead of ^0.9.x which they are right now. I had originally thought this was an npm issues -- having experienced many npm related bugs in the past since npm v5's release.

Thank you very much @tdillon !

@szeck87 let's go through the beautifier-* packages and change those version ranges 😃!

@stevenzeck
Copy link
Contributor

So until version 1.0.0 rolls around, we should treat the minor version as one that could have breaking changes. From https://docs.npmjs.com/misc/semver:

Caret ranges are ideal when an author may make breaking changes between 0.2.4 and 0.3.0 releases, which is a common practice. However, it presumes that there will not be breaking changes between 0.2.4 and 0.2.5

So we want to use >= 0.9.x?

@Glavin001
Copy link
Member Author

Fixed it!!! 🎉

@Glavin001
Copy link
Member Author

Will publish this weekend 👍.

Until then, Pull Requests are very welcome!!! 🎉

@Glavin001
Copy link
Member Author

Published! https://marketplace.visualstudio.com/items?itemName=Glavin001.unibeautify-vscode

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

No branches or pull requests

3 participants