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

jshint peer dependence doesn't allow hinting against ES2015 #133

Open
akc42 opened this issue Dec 4, 2015 · 8 comments
Open

jshint peer dependence doesn't allow hinting against ES2015 #133

akc42 opened this issue Dec 4, 2015 · 8 comments

Comments

@akc42
Copy link

akc42 commented Dec 4, 2015

with jshint having removed 2.9.0 and replaced it with 2.9.1-rc1, its currently not possible to hint against ES2015 modules.

I managed to work around this by changing the peerDependencies entry in gulp-jshint's package.json file to "jshint": "2.x || 2.9.1-rc1" having installed gulp-jshint, but before installing jshint itself.

Not sure if you want to enable this, but I post here in case others are having problems.

@spalger
Copy link
Owner

spalger commented Dec 9, 2015

Do you mean that 2.9.1-rc1 doesn't meet the 2.x version requirement? That seems strange since it was being installed by default before..

@cheton
Copy link

cheton commented Dec 9, 2015

I encountered the same error if "jshint": "^2.9.1-rc1" is specified in my devDependencies while using Node.js v0.12 and above versions:

npm WARN peerDependencies The peer dependency jshint@2.x included from gulp-jshint will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN prefer global jshint@2.9.1-rc1 should be installed with -g
npm ERR! Darwin 15.0.0
npm ERR! argv "/Users/cheton/.nvm/versions/node/v0.12.7/bin/node" "/Users/cheton/.nvm/versions/node/v0.12.7/bin/npm" "install"
npm ERR! node v0.12.7
npm ERR! npm  v2.11.3
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package jshint does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer gulp-jshint@2.0.0 wants jshint@2.x

@akc42
Copy link
Author

akc42 commented Dec 9, 2015

If you read the node semver details carefully (which I did to find out why it wasn't working and what you can do about it) you will see, sensibly, that any version with something on the back end of it doesn't meet the spec that 2.x matches.

@mikejr76
Copy link

akc I tried what you mentioned up top but it didn't work for me:
├── UNMET PEER DEPENDENCY jshint@2.x || 2.9.1-rc1
└─┬ jshint-stylish@2.1.0
├── log-symbols@1.0.2
├─┬ plur@2.1.1
│ └── irregular-plurals@1.1.0
├── string-length@1.0.1
└── text-table@0.2.0

npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Michael\Deskto
p\Everything_Node\learning\LearnNode\GulpLearn\node_modules\bin\package.json'
npm WARN gulp-jshint@2.0.0 requires a peer of jshint@2.x || 2.9.1-rc1 but none w
as installed.

@akc42
Copy link
Author

akc42 commented Dec 10, 2015

@mikejr76 what version of jshint have you installed? You will need to change your own package.json file, I have a line like this "jshint": ">= 2.9.1-rc1",

@akc42
Copy link
Author

akc42 commented Jan 3, 2016

@mikejr76 I just upgraded things and had to change the jshint line to 2.9.1.-rc2 both in gulp-jshint and in my own package.json file to make it work again. Before I did, I got the exact same error message that you reported above

rlgomes pushed a commit to rlgomes/jsoner that referenced this issue Jan 7, 2016
fix test expectation for slightly different error message between
0.10.x and 4.x+ node versions

remove the jshint devDependencies which brings up a bunch of issues
covered here: spalger/gulp-jshint#133
@dylanh724
Copy link

UNMET PEER DEPENDENCY jshint@2.x

^ This

@jkrot
Copy link

jkrot commented Apr 3, 2017

Note this is still an issue I have the same gulp-jshint@2.0.4 requires a peer of jshint@2.x but none was installed.

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

6 participants