Skip to content
This repository has been archived by the owner on Apr 16, 2022. It is now read-only.

circleci build fails #17

Closed
orthodoc opened this issue Sep 19, 2017 · 8 comments
Closed

circleci build fails #17

orthodoc opened this issue Sep 19, 2017 · 8 comments

Comments

@orthodoc
Copy link

mocha tests fail with the following error: Cannot find module 'babel-core/register'

@ruslantalpa
Copy link
Member

ruslantalpa commented Sep 19, 2017 via email

@orthodoc
Copy link
Author

npm install works locally and the tests pass locally.

But still this error on circle ci. Tried all of these:

  1. Change cache name in order to do a fresh install of the npm dependencies
  2. Built with ssh. Deleted the node_modules on the build box and a reinstall
  3. Saved exact versions of the babel packages and re-install

None of these strategies worked.

@ruslantalpa
Copy link
Member

can you paste the link to the full circleci log where things are failing?

@orthodoc
Copy link
Author

Will this web summary do? Its a public repo.

Didn't see any logs under artifacts to download.

@ruslantalpa
Copy link
Member

that link helps, it's exactly what i asked for.
this error is interesting.
it seems that when doing npm install, the file package.json changes and that files is used as a hash key for circleci cache, and because of this the node_modules does not get saved.

i see this line
npm notice created a lockfile as package-lock.json. You should commit this file.

this used to work but it seems node/npm changed something again.
i'll look into it (early next week) and make sure it works.
thanks for the report

@orthodoc
Copy link
Author

orthodoc commented Sep 21, 2017

package-lock.json was released with npm v5 & node v8

Am still following node LTS, which is still on npm v3. So package-lock.json is neither generated nor committed.

So changed the cicrcle config file to use a specific node version. And the tests passed.

Don't know if node latest is preferred or better over LTS!!

@ruslantalpa
Copy link
Member

reopening this to remember to "lock" the node version (not that important to be on the last version since node is only used for tests)

@ruslantalpa ruslantalpa reopened this Oct 26, 2017
@ruslantalpa
Copy link
Member

the cicleci file has been reworked recently, details here https://docs.subzero.cloud/build-and-deploy-pipeline/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants