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

npm test failing on v2 branch #31

Closed
zanedev opened this issue Aug 24, 2018 · 4 comments
Closed

npm test failing on v2 branch #31

zanedev opened this issue Aug 24, 2018 · 4 comments

Comments

@zanedev
Copy link

zanedev commented Aug 24, 2018

Using gatsby 2 and the gatsby 2 branch and getting the following when running npm test, not sure what the actual error is. Seems like deprecation warnings only.

$ npm test

> gatsby-starter-gcn@1.2.3 test /Users/user/Projects/project
> npm run lint:css && npm run lint:js && npm run check-pretty


> gatsby-starter-gcn@1.2.3 lint:css /Users/user/Projects/project
> stylelint 'src/**/*.js'


> gatsby-starter-gcn@1.2.3 lint:js /Users/user/Projects/project
> eslint --ext .js,.jsx .

(node:7837) [ESLINT_LEGACY_OBJECT_REST_SPREAD] DeprecationWarning: The 'parserOptions.ecmaFeatures.experimentalObjectRestSpread' option is deprecated. Use 'parserOptions.ecmaVersion' instead. (found in "standard-react")
(node:7837) [ESLINT_LEGACY_OBJECT_REST_SPREAD] DeprecationWarning: The 'parserOptions.ecmaFeatures.experimentalObjectRestSpread' option is deprecated. Use 'parserOptions.ecmaVersion' instead. (found in "node_modules/eslint-config-standard-jsx/index.js")
(node:7837) [ESLINT_LEGACY_OBJECT_REST_SPREAD] DeprecationWarning: The 'parserOptions.ecmaFeatures.experimentalObjectRestSpread' option is deprecated. Use 'parserOptions.ecmaVersion' instead. (found in "standard")

> gatsby-starter-gcn@1.2.3 check-pretty /Users/user/Projects/project
> prettier -l {,src/**/}*.{js,jsx,json,css,scss}

src/components/Card.js
src/components/TagList.js
src/pages/index.js
src/templates/tag.js
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! gatsby-starter-gcn@1.2.3 check-pretty: `prettier -l {,src/**/}*.{js,jsx,json,css,scss}`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the gatsby-starter-gcn@1.2.3 check-pretty script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/user/.npm/_logs/2018-08-24T03_06_04_998Z-debug.log
npm ERR! Test failed.  See above for more details.

@ryanwiemer
Copy link
Owner

@zanedev,

Good catch. That actually looks like an issue caused from upgrading eslint to v5.x. For now I went ahead an downgraded eslint back to v4.19.1 on my v2 branch. Just a note that this branch is still a work in progress so let me know if you notice any other issues or weird behavior since Gatsby v2 is still in beta.

@brandonkal - Since you created eslint-config-gatsby-standard you may want to look into supporting eslint v5. I can log a separate issue on your repo.

@ryanwiemer ryanwiemer changed the title npm test failing npm test failing on v2 branch Aug 24, 2018
@ryanwiemer
Copy link
Owner

Closing this issue for now since it was resolved by downgrading eslint to v4.x. I can revisit this again once eslint-config-gatsby-standard supports eslint v5.x

@zanedev
Copy link
Author

zanedev commented Aug 25, 2018

Thanks I will let you know if I come across anything else!

Unfortunately downgrading eslint didn't seem to fix it for me though I still get the same error. I removed my node_modules directory and reinstalled but same issue. Definitely have the v4.x eslint installed but same thing.

@ryanwiemer
Copy link
Owner

@zanedev, Hmmm weird.

I can't seem to replicate the issue after downgrading eslint. Definitely get rid of the node_modules folder. Maybe your package-lock.json is causing an issue. And if all else fails delete your .cache folder too for good measure.

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

2 participants