# CLI error on Mac

**URL:** <https://community.doppler.com/t/cli-error-on-mac/496>\
**Category:** Need Help\
**Created:** [January 26, 2022, 2:39pm UTC](https://community.doppler.com/t/cli-error-on-mac/496 "2022-01-26T14:39:31Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jose\_Perez](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/jose_perez/32/346_2.png) [@Jose\_Perez](https://community.doppler.com/u/Jose_Perez)\
**Post date:** [January 26, 2022, 2:39pm UTC](https://community.doppler.com/t/cli-error-on-mac/496/1 "2022-01-26T14:39:32Z")

</div>

Recently I updated my npm from 6.14.15 to 8.3.2, now every time I run ‘npm run dev’ I get the following error: ‘Error: This package is deprecated and no longer functional. Learn how to migrate to the new CLI’.

I’ve also done a doppler update and everything is already up to date. The current version of Doppler 3.37.0.

I went through the steps but I already have doppler all set up.

Not sure what else to do.

---

<div class="post-metadata">

**Author:** ![watsonian](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/watsonian/32/267_2.png) [@watsonian](https://community.doppler.com/u/watsonian)\
**Post date:** [January 26, 2022, 3:54pm UTC](https://community.doppler.com/t/cli-error-on-mac/496/2 "2022-01-26T15:54:14Z")

</div>

Hi @Jose_Perez!

Sorry that you’re having trouble here!

Could you post what you have set for the `dev` script in your `package.json`? Could you also add a new script that simply runs `doppler --version` and post what it displays when you run it via `npm run`?

Thanks,  
-Joel

---

<div class="post-metadata">

**Author:** ![Jose\_Perez](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/jose_perez/32/346_2.png) [@Jose\_Perez](https://community.doppler.com/u/Jose_Perez)\
**Post date:** [January 26, 2022, 4:15pm UTC](https://community.doppler.com/t/cli-error-on-mac/496/3 "2022-01-26T16:15:36Z")

</div>

Hi @watsonian ,

For the dev script I have “dev”: “doppler run – node server.js --inspect”. I am currently running my server by using that script instead of npm run dev.

The new script that you want me to add doppler --version, any specific way to add it?

Thanks

---

<div class="post-metadata">

**Author:** ![watsonian](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/watsonian/32/267_2.png) [@watsonian](https://community.doppler.com/u/watsonian)\
**Post date:** [January 26, 2022, 4:27pm UTC](https://community.doppler.com/t/cli-error-on-mac/496/4 "2022-01-26T16:27:20Z")

</div>

You should be able to just add a new entry in the `scripts` hash in your `package.json`. You can call the key whatever you like and make the value `doppler --version`. For example:

```json
"scripts": {
    ...
    "doppler-version": "doppler --version", 
    ...
},

```

Note that I’m just using `...` above as a placeholder for whatever other content is already there. Once you’ve added the above line, you should be able to run `npm run doppler-version`.

---

<div class="post-metadata">

**Author:** ![Jose\_Perez](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/jose_perez/32/346_2.png) [@Jose\_Perez](https://community.doppler.com/u/Jose_Perez)\
**Post date:** [January 26, 2022, 4:30pm UTC](https://community.doppler.com/t/cli-error-on-mac/496/5 "2022-01-26T16:30:18Z")

</div>

I get the same error as running npm run dev, ‘Error: This package is deprecated and no longer functional. Learn how to migrate to the new CLI’.

---

<div class="post-metadata">

**Author:** ![Jose\_Perez](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/jose_perez/32/346_2.png) [@Jose\_Perez](https://community.doppler.com/u/Jose_Perez)\
**Post date:** [January 26, 2022, 5:56pm UTC](https://community.doppler.com/t/cli-error-on-mac/496/6 "2022-01-26T17:56:10Z")

</div>

@watsonian I also have Storybook and if I run the npm run storybook command it works fine. But if I want to run npm run test I get the same error as running npm run dev.

---

<div class="post-metadata">

**Author:** ![watsonian](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/watsonian/32/267_2.png) [@watsonian](https://community.doppler.com/u/watsonian)\
**Post date:** [January 26, 2022, 8:43pm UTC](https://community.doppler.com/t/cli-error-on-mac/496/7 "2022-01-26T20:43:46Z")

</div>

Could you try changing that new script command to `which doppler` rather than `doppler --version`? It should give you the path to the Doppler CLI binary being executed. Once you have that, try running that binary (using the full path) with the `--version` flag:

```auto
/full/path/to/doppler --version

```

Then just run `which doppler` outside of `npm` and compare the paths. It seems like there are two separate copies of the Doppler CLI installed and one of them is up-to-date and the other (which is the one npm is using) isn’t.

---

<div class="post-metadata">

**Author:** ![Jose\_Perez](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/jose_perez/32/346_2.png) [@Jose\_Perez](https://community.doppler.com/u/Jose_Perez)\
**Post date:** [January 26, 2022, 10:03pm UTC](https://community.doppler.com/t/cli-error-on-mac/496/8 "2022-01-26T22:03:08Z")

</div>

This is what I got after running the ‘which doppler’,

If I have two files/versions what or how can I fix this?

If it’s best, is there a way to jump on a Google meet/Zoom chat?

 ![Screen Shot 2022-01-26 at 3.40.44 PM](https://us1.discourse-cdn.com/flex016/uploads/doppler/original/1X/0cf43402a44ad40dbd538cf0a4b5014595ea4884.png)

---

<div class="post-metadata">

**Author:** ![watsonian](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/watsonian/32/267_2.png) [@watsonian](https://community.doppler.com/u/watsonian)\
**Post date:** [January 26, 2022, 10:51pm UTC](https://community.doppler.com/t/cli-error-on-mac/496/9 "2022-01-26T22:51:04Z")

</div>

Okay, it looks like you’re using a deprecated `doppler-cli` [npm package](https://www.npmjs.com/package/doppler-cli) that’s no longer maintained. If you remove that from your project dependencies, then it should use the system Doppler CLI and you should get back into a good state!

---

<div class="post-metadata">

**Author:** ![Jose\_Perez](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/jose_perez/32/346_2.png) [@Jose\_Perez](https://community.doppler.com/u/Jose_Perez)\
**Post date:** [January 26, 2022, 11:31pm UTC](https://community.doppler.com/t/cli-error-on-mac/496/10 "2022-01-26T23:31:19Z")

</div>

Thank you @watsonian! I am all set and running again!
