What is `”dev” true` in package-lock.json for?

So answering your first question, “dev”: true in package-lock.json means this dependency won’t be installed by npm install/npm ci when running in production mode. Having dependencies used only for local development environment marked with “dev”: true and then using –production in your CI might save you some build time. From documentation https://docs.npmjs.com/cli/install#description: By default, npm … Read more

How to update package-lock.json without doing npm install?

npm As of npm 6.x, you can use the following command: npm i –package-lock-only Documentation (https://docs.npmjs.com/cli/install.html) says: The –package-lock-only argument will only update the package-lock.json, instead of checking node_modules and downloading dependencies. yarn As of yarn 3.0.0, you can use the following command: yarn install –mode update-lockfile Documentation (https://yarnpkg.com/cli/install#options-mode%20%230) says: If the –mode=<mode> option is … Read more

Pass command line args to npm scripts in package.json

Short Answer: Essentially, what you’re wanting is to have an npm-script something like this, whereby <arg-here> is provide via the CLI; … “scripts”: { “my-build”: “npm run vumper <arg-here> && npm run format”, … }, … However, unfortunately npm does not have a built-in feature to achieve this. The special npm option –, (refer to … Read more

“sill pacote range manifest” means what?

sill After reading npmlog module source code (which is used by npm), I believe the word sill come from silly, which means the most detail log level in npm install process. There are 9 levels of log in npmlog: silent, error, warn, notice, http, timing, info, verbose, silly. log.addLevel(‘silly’, -Infinity, { inverse: true }, ‘sill’) … Read more

npm scripts: read .env file

Short answer: There’s no terse way to achieve this that works cross-platform, as per your second example which references the $npm_package_config variable. For a cross-platform solution, i.e. one that works successfully on both *nix and Windows platforms – whereby the default shell utilized by npm scripts is either sh or cmd respectively, you’ll need to … Read more

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