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

Error when doing code coverage: "ecmaVersion must be 3, 5, 6, or 7." #705

Closed
kbmmdwork opened this issue May 15, 2017 · 8 comments
Assignees
Labels
Milestone

Comments

@kbmmdwork
Copy link

@kbmmdwork kbmmdwork commented May 15, 2017

See my comment on this thread #676

Essentially, I resolved the issue by forcing npm to install the latest version of espree (3.4.3). I believe the fix for lab will be for it to depend on 3.4.3 (or whatever minimum resolves this issue) because, although, 3.1.7 satisfies the dependency requirement (3.x.x) that isn't sufficient to do the code coverage without getting this error.

Also, I had to downgrade lab to 12.1.0 (13.x.x isn't generating any code coverage - clover.xml file is empty and html report is also empty)

@Marsup

This comment has been minimized.

Copy link
Member

@Marsup Marsup commented May 15, 2017

Then reinstall your dependencies, lab depends on whatever 3 (https://github.com/hapijs/lab/blob/master/package.json#L19).

@Marsup

This comment has been minimized.

Copy link
Member

@Marsup Marsup commented May 15, 2017

Sorry, missed something in your comment. You should go complain to jsdoc, this is not really lab's fault.

@kbmmdwork

This comment has been minimized.

Copy link
Author

@kbmmdwork kbmmdwork commented May 15, 2017

Thanks @Marsup - I used rm -rf node_modules and re-installed dependencies - that didn't resolve the problem

@kbmmdwork

This comment has been minimized.

Copy link
Author

@kbmmdwork kbmmdwork commented May 15, 2017

@Marsup - right, but can't lab work around the problem by depending on a newer version of espree? i.e. change lab's package.json on line #19 to depend on >= 3.4.x (or whatever version it really depends on)

@Marsup

This comment has been minimized.

Copy link
Member

@Marsup Marsup commented May 15, 2017

That's not the policy of this organization, I don't know if @geek will make an exception. FWIW jsdoc seems pretty dead right now, isn't there an active fork somewhere ?

@kbmmdwork

This comment has been minimized.

Copy link
Author

@kbmmdwork kbmmdwork commented May 15, 2017

OK, I see what you're saying... I didn't realize that it was our project that was using jsdoc - so we're essentially downgrading the espree version by depending on it. Still, I don't see why lab "allows" a version of espree that is lower than what it really requires to function correctly.

@Marsup

This comment has been minimized.

Copy link
Member

@Marsup Marsup commented May 15, 2017

Fair enough, espree seems to bump ecmaVersion on minors, so I guess we should pin on 3.4.x, any opinion @geek ?

@geek

This comment has been minimized.

Copy link
Member

@geek geek commented May 15, 2017

I'm fine pinning to 3.4.x for espree.

@geek geek added request dependency and removed request labels May 15, 2017
@geek geek self-assigned this May 16, 2017
@geek geek added this to the 13.1.0 milestone May 16, 2017
@geek geek closed this in #707 May 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.