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

Run npm update and npm install on CircleCI #1685

Closed
wants to merge 1 commit into from

Conversation

lucaswoj
Copy link
Contributor

@lucaswoj lucaswoj commented Nov 9, 2015

Because CircleCI uses a cached node_modules folder and never runs npm update, it doesn't grab the latest versions of dependencies. This PR causes CircleCI to run npm update alongside npm install on every build.

Is this approach preferable to using shrinkwrap #1607?

fixes #1600

cc @jfirebaugh @tmcw @mourner

@lucaswoj
Copy link
Contributor Author

lucaswoj commented Nov 9, 2015

The npm update command seems to work, although the build log has lots of warnings about undefined version #s. I'm not sure what to make of that as I have never seen those messages locally.

Maybe deleting the cached node_modules folder once will help?

@@ -5,6 +5,8 @@ dependencies:
pre:
- sudo apt-get update; sudo apt-get -y install python-pip libglew-dev gdb
- sudo pip install awscli
override:
- npm update && npm install
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are both update and install required? The docs say update "will also install missing packages".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. The one difference is that npm update doesn't run any of the package.json scripts (preinstall, postinstall, prepublish).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're not using any of those scripts right now but disabling them feels like a big "gotcha" waiting to happen. Not sure how to weigh that cost against the increased build time.

@jfirebaugh
Copy link
Contributor

I don't have a strong gut feeling on npm update vs shrinkwrap. I think shrinkwrap solves a theoretical problem but has more unknowns.

@lucaswoj
Copy link
Contributor Author

lucaswoj commented Nov 9, 2015

My gut feeling is that we should try the npm update solution for now and move to shrinkwrap if/when we hit more pain points.

@lucaswoj
Copy link
Contributor Author

On further thought, lets skip npm install and just run npm update.

"job security"

@lucaswoj
Copy link
Contributor Author

Ok. I think the latest iteration gets it right. We run npm update and trigger all the scripts manually.

🚢 @jfirebaugh?

@jfirebaugh
Copy link
Contributor

👍

@lucaswoj
Copy link
Contributor Author

Merged in 9db3c0a

@lucaswoj lucaswoj closed this Nov 10, 2015
@lucaswoj lucaswoj deleted the lucaswoj-npm-update-1600 branch November 10, 2015 19:35
lucaswoj pushed a commit that referenced this pull request Dec 13, 2016
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.

Bump geojson-vt dep version
2 participants