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

Update dependencies. #9

Merged
merged 1 commit into from
Apr 10, 2019
Merged

Update dependencies. #9

merged 1 commit into from
Apr 10, 2019

Conversation

toolness
Copy link
Contributor

I'm not sure how/why @sraby wasn't experiencing this on his local setup--perhaps he had a system-wide npm cache that was causing different versions of dependencies to be installed--but netlify and I were experiencing super weird problems like npm noticing lots of security vulnerabilities and in particular a problem in the GraphQL query on the worst evictors list of the form:

Unknown field `json` on type `subtitle_6`

I looked into things and it seems the json field was only added to gatsby-source-contentful in version 2.0.33, while this project's package.lock specified version 2.0.1. After running npm update and then npm audit fix everything seems to work fine, though!

I also mentioned this at gatsbyjs/gatsby#13109 (comment) in case anyone else runs into the same problem we ran into.

@toolness
Copy link
Contributor Author

Update: found out that @sraby was using yarn, not npm, which meant that his system was bypassing package-lock.json entirely and obeying the ^2.0.1 version specifier for gatsby-source-contentful in package.json, which made it install 2.0.33 or above.

We should definitely make sure developers and netlify are using the same package manager (either npm or yarn) with the same lockfile or else dev/prod parity will suffer!

@sraby sraby merged commit ca36bac into master Apr 10, 2019
@sraby sraby deleted the update-deps branch April 10, 2019 21:43
@sraby
Copy link
Member

sraby commented Apr 10, 2019

GAH! You saved me @toolness... so, turns out Netlify will default to using NPM unless there is a yarn-lock file found. My foolish self didn't realize that I had left yarn-lock in my .gitignore. Luckily, after merging your dependency updates, I was able to add it back and now Netlify is using Yarn as it should

@toolness
Copy link
Contributor Author

Oh cool! In that case yeah, we should totes remove package-lock.json and keep only yarn.lock in the repo!

@toolness
Copy link
Contributor Author

Oh you already did that, awesome!

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

Successfully merging this pull request may close these issues.

2 participants