CircleCI-Public / CircleCI-Public/circleci-demo-javascript-express
Issue with npm install
- Dominant language
- JavaScript
- Stars
- 134
- Forks
- 2k
- PR merge metrics
- No merged PRs in 30d
Description
Getting following error:
``` cmd
module.js:487
throw err;
^
Error: Cannot find module 'semver'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object. (/usr/local/lib/node_modules/npm/lib/utils/unsupported.js:2:14)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
Exited with code 1
```
CircleCI config file:
``` yml
version: 2
jobs:
build:
docker:
- image: circleci/node:latest
working_directory: ~/repo
steps:
- checkout
- run:
name: update-npm
command: 'sudo npm install -g npm@latest'
- restore_cache:
key: v0-dependencies-{{ checksum "package.json" }}
- run:
name: install-npm-packages
command: 'npm install'
- save_cache:
paths:
- ./node_modules
key: v0-dependencies-{{ checksum "package.json" }}
- run:
name: test
command: |
echo Running Tests
npm run test
- store_artifacts:
path: test-results.xml
prefix: tests
- store_artifacts:
path: coverage
prefix: coverage
- store_test_results:
path: test-results.xml
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the failure with the CircleCI configuration shown, especially the update-npm and npm install steps in the circleci/node image. Inspect package.json and the npm error output; done means dependencies install successfully and the existing test step can run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100