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.

vscode package.json String does not match the pattern

This behavior is by design to enforce NPM conventions for the package.json file (to paraphrase, “lower-case only”). I agree it is a nuisance, especially since the project name is often pre-filled, e.g. by “create-react-app”. As you point out, it is possible to create a custom schema to ignore this, but it’s really not recommended. There … Read more

Is node-sass a dev or a production dependency on React projects?

Since it’s required to do a production build, it should be in the production dependencies list imho. In my experience, most of the time the project gets build afresh for production, so needs all the packages required to build from scratch. A dev dependency might something like webpack-dev-server which isn’t needed for a prod build, … Read more

Why (and How Can I FIx) ESLint import/no-extraneous-dependencies Failures on Installed Packages?

Add the following to your eslint, just to have the correct rule in there. And yes you can also turn it off, but the error is there for e reason. “import/no-extraneous-dependencies”: [“error”, {“devDependencies”: false, “optionalDependencies”: false, “peerDependencies”: false}] As far as I can tell, there is no issue with your package.json, so it has to … Read more

What is the correct way of adding `react` as a dependency in the `package.json` of a reusable components library?

For reusable components: Put a react dependency in both peerDependencies and devDependencies. Never put a react dependency in dependencies. peerDependencies specifies which version(s) of React your reusable component supports/requires. When using npm 2 this also adds React to the list of modules to be installed, but this is no longer the case with npm 3. … Read more

Import from subfolder of npm package

Can I skip the src/ directory somehow in the import path? Yes. Using the package.json “exports” field, which should be supported by Webpack in a near future (see this issue), but has already been supported by Node since Node 12 LTS following the Bare Module Specifier Resolution proposal: package.json … “main”: “./src/index.js”, “type”: “module”, … … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)