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 · 9 comments · Fixed by #707
Closed

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

kbmmdwork opened this issue May 15, 2017 · 9 comments · Fixed by #707
Assignees
Labels
dependency Update module dependency
Milestone

Comments

@kbmmdwork
Copy link

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Author

kbmmdwork commented May 15, 2017

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

@kbmmdwork
Copy link
Author

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
Copy link
Contributor

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
Copy link
Author

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
Copy link
Contributor

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
Copy link
Member

geek commented May 15, 2017

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

@geek geek added request dependency Update module 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 as completed in #707 May 16, 2017
@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependency Update module dependency
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants