# I am getting a semver module error for an angular project

**URL:** <https://community.jenkins.io/t/i-am-getting-a-semver-module-error-for-an-angular-project/7670>\
**Category:** Using Jenkins\
**Tags:** question\
**Created:** [May 29, 2023, 7:06am UTC](https://community.jenkins.io/t/i-am-getting-a-semver-module-error-for-an-angular-project/7670 "2023-05-29T07:06:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bling](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/bling/32/4395_2.png) [@bling](https://community.jenkins.io/u/bling)\
**Post date:** [May 29, 2023, 7:06am UTC](https://community.jenkins.io/t/i-am-getting-a-semver-module-error-for-an-angular-project/7670/1 "2023-05-29T07:06:04Z")

</div>

npm -v  
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.  
node:internal/modules/cjs/loader:936  
throw err;  
^

Error: Cannot find module ‘semver’

Hi , I am getting the node and npm version on my local computer but on jenkins i am only getting the node version , where as for npm version its showing the above error.

I checked with the global variables and also configured Node Installations in Tools .

Please suggest some ideas to resolve this error … Thanks in advance for the suggestions

---

<div class="post-metadata">

**Author:** ![poddingue](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/poddingue/32/985_2.png) [@poddingue](https://community.jenkins.io/u/poddingue)\
**Post date:** [May 29, 2023, 1:49pm UTC](https://community.jenkins.io/t/i-am-getting-a-semver-module-error-for-an-angular-project/7670/2 "2023-05-29T13:49:59Z")

</div>

Hello @bling and welcome to this community 👋

I’m not an expert on `npm` at all, to say the truth, for me it’s always a pain in the neck to use it.  
Anyway.  
The error message you provided seems to indicate that there is a missing module called `semver` in your Jenkins environment.

If you have access to your agent, first update `npm`:

```bash
npm install -g npm@latest

```

Then check is npm is installed where your pipeline expects it to be:

`which npm`

Then you could go with the install of `semver` itself:

```bash
npm cache clean --force
npm install semver

```

in your project repo, or

```bash
npm install -g semver

```

to get it installed globally.
