Roots Discourse

Adding new npm module problem


#1

When i added custom module to npm it deleted yarn and reinstall all npm modules. I just tried install a little javascript extension.

npm install mo-js

I like yarn add </> but some plugins doesn’t support yarn. Is anyway to add with npm correctly?


#2

Can you share the actual output of any errors you are encountering?


#3

It not outputs any error. When install mo-js or any library (with npm), i lost yarn install. I must reinstall yarn after npm-install.


#4

Did you install Yarn with npm (i.e. npm install -g yarn)? I would not recommend that. Follow one of the following methods to install Yarn:

macOS:
https://roots.io/getting-started/docs/macos-development-environment-sage/#yarn

Ubuntu:
https://roots.io/getting-started/docs/ubuntu-linux-development-environment-sage/#yarn

Windows: