not able to install anything using npm in node - javascript

I am using this in my node terminal
C:\Users\Rahul Kumar\Documents\JSProj\app>npm install lodash --save
C:\Users\Rahul Kumar\Documents\JSProj>npm install -g babel
Getting this error
npm WARN package.json app#1.0.0 No description
npm WARN package.json app#1.0.0 No repository field.
npm WARN package.json app#1.0.0 No README data

Related

I am installing polymer in visual studio code but there are many errors I am getting a lot of errors

C:\Program Files\nodejs>npm install -g bower
npm WARN deprecated bower#1.8.8: We don't recommend using Bower for new projects. Please consider Yarn and Webpack or Parcel. You can read how to migrate legacy project here: https://bower.io/blog/2017/how-to-migrate-away-from-bower/
C:\Users\Deepanshi\AppData\Roaming\npm\bower -> C:\Users\Deepanshi\AppData\Roaming\npm\node_modules\bower\bin\bower
bower#1.8.8
added 1 package from 1 contributor in 14.243s
C:\Program Files\nodejs>npm install -g polymer-cli#next
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\polymer-cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})
npm ERR! code EEXIST
npm ERR! path C:\Users\Deepanshi\AppData\Roaming\npm\node_modules\polymer-cli\bin\polymer.js
npm ERR! dest C:\Users\Deepanshi\AppData\Roaming\npm\polymer
npm ERR! EEXIST: file already exists, cmd shim 'C:\Users\Deepanshi\AppData\Roaming\npm\node_modules\polymer-cli\bin\polymer.js' -> 'C:\Users\Deepanshi\AppData\Roaming\npm\polymer'
npm ERR! File exists: C:\Users\Deepanshi\AppData\Roaming\npm\polymer
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Deepanshi\AppData\Roaming\npm-cache_logs\2020-10-07T12_56_44_680Z-debug.log
Try this :
npm i -g --force npm (note the --force flag)
If your output is get running npm install -g npm:
You can fix it with "brew reinstall node"
So :
brew reinstall node
npm i -g --force npm

why there are errors when i install solc compiler with npm?

with the latest version of npm but i cant install compiler successfully.
ash#ubuntu:~/inbox$ node -v
v8.11.1
ash#ubuntu:~/inbox$ npm -v
5.8.0
ash#ubuntu:~/inbox$ sudo npm install --save solc
npm WARN saveError ENOENT: no such file or directory, open '/home/ash/inbox/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/home/ash/inbox/package.json'
npm WARN webpack-cli#2.0.14 requires a peer of webpack#^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN inbox No description
npm WARN inbox No repository field.
npm WARN inbox No README data
npm WARN inbox No license field.
+ solc#0.4.21
updated 1 package in 5.593s
ash#ubuntu:~/inbox$
enter image description here
You're attempting to install into a project directory which will try to update the project's package.json file to add the dependency. The install still worked. You will find it under node_modules/solc.
The better approach is to install it globally:
npm install -g solc

Can't install cordova with npm 5.6.0

I can't install cordova in my Linux (deepin 15.5), please help me :)
$ sudo npm install -g ionic
/usr/local/bin/ionic -> /usr/local/lib/node_modules/ionic/bin/ionic
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.3 (node_modules/ionic/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
\+ ionic#3.19.0
updated 1 package in 8.52s
$sudo npm install -g cordova
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead
npm ERR! path /usr/local/lib/node_modules/cordova/node_modules /npm/node_modules/ansistyles
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/cordova/node_modules/npm/node_modules/ansistyles' -> '/usr/local/lib/node_modules/cordova/node_modules/npm/node_modules/.ansistyles.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2017-12-08T19_53_31_209Z-debug.log
You could try downgrading your NPM version. Personally, I had some issues with 5.6.0 and had to downgrade to 5.3.0, haven't had a problem with any packages since then.
If you want to, this is how you'd downgrade your version to 5.3.0:
npm install -g npm#5.3.0
Cheers!
EDIT: Also, make sure there have not been any previous installations of the package you are trying to install. Leftovers or older versions may cause conflict which might not let you install/update to newer versions.
Try this, if the previous solution doesn't work:
npm uninstall -g cordova
npm install -g cordova
Struggled for hours trying to uninstall and reinstall npm/node, with different versions and so on, but what finally did the work (without downgrading from 5.6.0) was as #Sairo Guanipa mentiond:
npm uninstall -g cordova
npm install -g cordova
From here on all worked fined (cordova/windows for me)

Not compatible with your operating system or architecture: fsevents#1.0.11

I'm using Ubuntu 15.04. While running the following command:
npm install fsevents
I'm getting following error:
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.0.11
npm WARN tutorial#1.0.0 No repository field.
Has anybody solved this?
I was facing the same issue with this dependecy when building other application.
Just for the sake of knowledge and to people who are not well used to NPM, and thus uncertain about how their applications will behave:
Since fsevents is an API in OS X allows applications to register for notifications of changes to a given directory tree. Running:
npm install --no-optional
Will do the trick, with no drawbacks.
It's not an error, it's just a warning: it's an optional dependency.
You can tell npm not to install optional dependencies by default using the command line below:
npm config set optional false
If you're getting ERR! not WARN a likely cause of this issue is that you're using a really outdated version of NPM
For me, I shelled into some server, and was like "why won't this work?", getting this error:
npm ERR! Linux 4.4.0-130-generic
npm ERR! argv "/home/william/.nvm/versions/node/v4.4.3/bin/node" "/home/william/.nvm/versions/node/v4.4.3/bin/npm" "install"
npm ERR! node v4.4.3
npm ERR! npm v2.15.1
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported
npm ERR! notsup Not compatible with your operating system or architecture: fsevents#1.1.3
npm ERR! notsup Valid OS: darwin
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: linux
npm ERR! notsup Actual Arch: x64
npm ERR! Please include the following file with any support request:
npm ERR! /home/william/app/mcard-api/npm-debug.log
Turns out this server (that I only recently acquired) was running npm 2.15.1. I re-installed nvm, and nvm install --lts fixed it.
I had same issue with dependency. Kindly check for the package.json file , add "typings":"^0.8.1" entry under devDependency section. dont forget to add comma before :) Hope it will resolve issue.
I was also facing this error when installing Redux:
$ npm install --save react-redux
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.0.14
What solved the issue was to add --no-optional (argument will prevent optional dependencies from being installed):
npm install --no-optional --save react-redux
^^^^^^^^^^^^^
And now it is correctly installed:
$ npm ls redux
ReduxProject# /home/me/projects/reduxproject
└── redux#3.5.2
I found if you use "yarn add ." Yarn will exclude the fsevents will not throw an error.

npm WARN install Refusing to install smart-app-banner as a dependency of itself

I tried to build the source of: https://github.com/kudago/smart-app-banner
With:
npm install --save smart-app-banner
but I get:
npm WARN install Refusing to install smart-app-banner as a dependency of itself
What is wrong here? How can I compile the source?
$ mkdir smart-app-banner
$ cd smart-app-banner
$ npm init
Now, your package.json has a "name" : "smart-app-banner" property
When doing npm install smart-app-banner, NPM thinks you are trying to install the package in itself, because of that name.
Edit : Please follow this link

Categories

Resources