Top "Package.json" questions

All npm packages contain a file, usually in the project root, called package.

OS independent access to variables in package.json

To access a variable in npm scripts you would do something like this in your package.json: "scripts": { "preinstall": "echo ${…

node.js npm environment-variables package.json
Why (and How Can I FIx) ESLint import/no-extraneous-dependencies Failures on Installed Packages?

When I run ESLint I get the following errors: 1:13 error 'joi' should be listed in the project's dependencies. Run 'npm …

eslint package.json
Private bitbucket repository in package.json with version

I am trying to include a private BitBucket repository to my package.json, but I also would like to manage …

bitbucket npm-install node-modules package.json
Create package.json from package-lock.json

I downloaded a theme and it has a package-lock.json file but no package.json file. Is there a way …

node.js webpack package.json package-lock.json
Do yarn workspaces work with npm, too?

I checked out a repo which uses yarn instead of npm as build tool. in the package.json, it defines …

npm package.json yarnpkg
How do I install a package with npm with a different/custom module name

I want to install a specific revision from a github tarball named something like "mymodule" and name it something like "…

node.js npm node-modules package.json
How to specify webpack-dev-server webpack.config.js file location

I am starting with webpack. I have been able to specify to webpack the location of webpack.config.js like …

webpack webpack-dev-server package.json
How do you use the 'files' and 'directories' properties in package.json?

If a package.json has a files prop, and/or a directories prop: "files": [ "./src/assets/fonts/" ], "directories": { "assets:": "./src/…

npm package.json
Pass command line -- argument to child script in Yarn

I have a package.json that looks similar to this: "scripts": { "dev": "cross-env BABEL_ENV=client webpack --config webpack/client.…

node.js npm package.json yarnpkg npm-scripts