Skip to content

Issue with npm install #4

Description

@AlokBansal8

Getting following error:

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.<anonymous> (/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:

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions