I have added latest version of #angular-devkit/build-angular in package.json and did npm install ,it should install webpack as well ,as a peer dependency but its not installing ,its throwing a warning explicitly to install webpack when I do npm install.I can explicitly install the module but I want that to happen from #angular-devkit/build-angular itself. what could be the reason?
Related
Q.1 if we use below command how many places will be affected in angular project
npm install bootstrap
Q.2 what is difference if we use above command with --save
npm install bootstrap --save
Q1. Running 'npm install bootstrap' command will download the latest version of bootstrap and install in subfolder './node_module' folder.
Q2. Running install --save bootstrap will do same as above but will update package.json by adding entry under dependencies.
Before npm 5.0.0 they were different but now there is no difference.
Before version 5.0.0
npm install bootstrap --save would download the latest version of bootstrap and add it to your dependencies in package.json file.
npm install bootstrap would download the latest version of bootstrap but it would not add it in dependencies in package.json file.
After version 5.0.0
there is no difference between both commands. As it was --save was made default so with or without --save it would add it in dependencies in package.json
In addition, there are the complementary options --save-dev and --save-optional which save the package under devDependencies and optionalDependencies, respectively. This is useful when installing development-only packages, like grunt or your testing library.
I've updated gulp from v 3.9.0 to 4.0.0. When I run gulp i get error Cannot read property 'apply' of undefined. I've read that this is because of gulp-cli version 3.9.0 and I need to update to 2.1.0
On my local machine i've got all to work, and the versions are:
CLI Version: 2.1.0
Local Version: 4.0.0
But on our dev-server the CLI-version won't change and it's stuck at 3.9.0.
I have uninstalled both gulp and gulp-cli, removed the node_modules folder. Installed it again and it's the correct versions in the package.json.
"gulp": "^4.0.0",
"gulp-cli": "^2.1.0",
But when i run gulp -v now it still outputs CLI Version: 3.9.0..
Someone familiar with this? gulp 3.9.0 is globally installed on the server, can this cause the problem?
First uninstall your current versions of Gulp and Gulp CLI:
npm uninstall gulp --save-dev
npm uninstall gulp -g
then go ahead and reinstall Gulp version 4.0.0:
npm install gulp-cli -g
npm install gulp#4.0.0
I tried npm install and npm install --no-optional for my forked repository, and it was not installed completely: git+https://github.com/marsonmao/react-sketch#v0.4.104 (link).
After using npm install, only part of the repository was installed: there are only /node_modules and .eslintrc, karma.config.js, README.md...etc in MyProject/node_modules/react-sketch, but no /lib and /src...etc.
Then I tried yarn install and it was successful, every file in the repository was installed.
So why npm failed however yarn succeeded?
npm version: 5.5.1, yarn version: 1.3.2
I have a web application with some packages defined in package.json after I run npm install all dependencies are resolved. However when I add some packages after that to package.json and run npm install again nothing happens. I did the work around by typing npm install --save lodash and it downloaded the dependency and updated packages.json. It works, but let's imagine the scenario when I want to add 10 or more packages. Then it would be easier for me to just add them to package.json and run npm install but this does not work :/. So what would be the solution for the problem off adding more packages after initial npm install?
Node version: v8.1.3
npm version: 5.03
Operating System: Windows 10 Pro
My IntelliJ is not seeing my karma plugins:
WARN [plugin]: Cannot find plugin "karma-ng-extjs-scenario".
Did you forget to install it ?
npm install karma-ng-extjs-scenario --save-dev
WARN [plugin]: Cannot find plugin "karma-jasmine".
Did you forget to install it ?
npm install karma-jasmine --save-dev
WARN [plugin]: Cannot find plugin "karma-chrome-launcher".
Did you forget to install it ?
npm install karma-chrome-launcher --save-dev
WARN [plugin]: Cannot find plugin "karma-firefox-launcher".
Did you forget to install it ?
npm install karma-firefox-launcher --save-dev
I believe it is because i was following a tutorial that told me to install them globally.
But then i realised that i wanted to install them locally and save to the package.json.
I try again to install locally and it doesnt fix it:
$ npm install karma-jasmine --save-dev
npm WARN package.json karma-ie-launcher#0.1.5 No README data
info trying registry request attempt 1 at 21:06:11
http GET https://registry.npmjs.org/karma-jasmine
http 304 https://registry.npmjs.org/karma-jasmine
karma-jasmine#0.1.5 ../../../node_modules/karma-jasmine
I can however run karma from within my project from the command line and the plugins exist in the npm modules directory.
Is there a way to fix this or do i need to reinstall the packages from scratch? If so, what is the easiest way of doing that?
the --link flag linked the global install into the local directory.
npm install karma-jasmine --save-dev --link