Cannot find module ‘prettier’
Prettier is a peer dependency of @vue/eslint-config-prettier so you need to add it to your own dependencies: npm install –save-dev prettier
Prettier is a peer dependency of @vue/eslint-config-prettier so you need to add it to your own dependencies: npm install –save-dev prettier
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.
Fundamentally, package.json is a meta file for your application. It lists all the configuration of your application. What is the effect of having no package.json? Nothing as far as you’re running all your code locally and have no requirement for deployment whatsoever. Let’s setup a scene for you to understand this better. Imagine that you … Read more
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
Please always use kebab case. The colon is a throwback to gulp, and it looks terrible. I hate it. Disclaimer: My opinions are often wrong.
The next tag is used by some projects to identify the upcoming version.By default, other than latest, no tag has any special significance to npm itself. NPM Documentation
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
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
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
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