Skip to content
This repository was archived by the owner on May 22, 2021. It is now read-only.

Move cross-env to a dep #119

Merged
merged 3 commits into from
Jun 22, 2017
Merged

Move cross-env to a dep #119

merged 3 commits into from
Jun 22, 2017

Conversation

pdehaan
Copy link
Contributor

@pdehaan pdehaan commented Jun 22, 2017

Currently you get errors if you only install the dependencies and then run npm start:

$ NODE_ENV=production npm install
added 174 packages in 6.285s


$ npm start

> portal-alpha@1.0.0 prestart /Users/pdehaan/dev/github/mozilla/something-awesome
> npm run bundle


> portal-alpha@1.0.0 bundle /Users/pdehaan/dev/github/mozilla/something-awesome
> browserify frontend/src/main.js | uglifyjs > public/bundle.js


> portal-alpha@1.0.0 start /Users/pdehaan/dev/github/mozilla/something-awesome
> cross-env NODE_ENV=production node server/portal_server

sh: cross-env: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! portal-alpha@1.0.0 start: `cross-env NODE_ENV=production node server/portal_server`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the portal-alpha@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

@abhinadduri
Copy link
Collaborator

This might be because of an outdated package-lock. Cross-env is already listed as a dev-dependency -- would moving it to the dependency list affect this?

@dannycoates
Copy link
Contributor

yeah this should be a dep since we use it in npm start

@pdehaan
Copy link
Contributor Author

pdehaan commented Jun 22, 2017

Not entirely sure what I'm doing wrong. This works for me locally if I install locally using the package-lock.json. But oddly the Circle-CI run is suspiciously only installing 13 packages:

$ npm install
added 13 packages, removed 1 package and updated 9 packages in 9.355s

@pdehaan pdehaan merged commit 976a92d into mozilla:master Jun 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants