Or with npx: $ npx add-dependencies /home/user/project/package. By default with version npm 5.0+ npm install adds the module to the dependencies list in the package.json file with earlier versions of npm, you must specify. Use -no-overwrite flag to prevent already existing packages in package.json from being overwritten.Įxample: $ add-dependencies /home/user/project/package.json redux eslint -dev If no package_file argument passed, the script searches for a package.json file within the current working directory. It will be added to devDependencies in package.json. If no target argument passed, dependencies are written to dependencies. save-dev : This flag specifies that we want the package to be a development dependency. -optional / -save-optional / -O for optionalDependencies.-peer / -save-peer / -P for peerDependencies.Adding -save simply adds gulp to your package. As you say, you have installed gulp successfully locally and you needed to have it installed globally too anyway. -dev / -save-dev / -D for devDependencies So I tried running npm install gulp -save dev and sure enough, I got the same error message as you.Where dependencies is the list of dependencies divided by space, and target is one of the following: If not using with npx (see below): $ npm install add-dependencies Or when using npm run: npm install -save-dev parcel. Haven't found, then made a script which adds dependencies (latest or specified versions) to the package.json file skipping the installation process.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |