Should I have Travis cache node_modules or $HOME/.npm

I noticed caching the node_modules folder caused problems (build fails) while caching the .npm cache avoided it. I believe it’s because the .npm cache doesn’t store compiled native modules while the node_modules folder does. So when you test different versions of node, as is common in Travis-CI, it will try to load a native module … Read more

Do yarn workspaces work with npm, too?

Now that npm v7.0.0 is out, npm supports workspaces. You can manage multiple packages from within a singular top-level, root package. See more at https://github.blog/2020-10-13-presenting-v7-0-0-of-the-npm-cli/ Your workflows will not get npm v7.0.0 by default unless you install it using npm install -g npm@7.

Yarn run multiple scripts in parallel

There is a difference between using & and &&. Using & will run scripts in parallel, using && will run scripts one after the other. package.json: { “parallel”: “yarn script1 & yarn script2”, “serial”: “yarn script1 && yarn script2”, “script1”: “… some script here”, “script2”: “… some there script here” }

How to create run configuration with Yarn instead of npm in WebStorm 2016.2.3

yarn will be supported in 2016.3 As stated in https://youtrack.jetbrains.com/issue/WEB-23737#comment=27-1669437 In WebStorm 2016.3 it will be possible to select yarn package instead of npm: go to Settings | Languages & Frameworks | Node.js and NPM click ellipsis button next to Node.js interpreter to open “Node.js interpreters” dialog Also, installed yarn packages will be available in … Read more