how do I install npm packages in linux machine - node.js

I've installed nodejs v7.5.0 and npm v4.1.2 in my 32 bit linux mint machine. while I'm typin' npm install into terminal, it gives me these informations instead of being installed npm packages are:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.0.17: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"ia32"})
npm WARN #angular/core#2.4.7 requires a peer of rxjs#^5.0.1 but none was installed.
npm WARN shwokat#1.0.0 No description
npm WARN shwokat#1.0.0 No repository field
Now where's my wrong? how to solve it and install npm packages correctly, please let me know?

Try sudo npm install npm -g
Go through the official guide.

Related

Got warnings while installing Eslint in Atom editor

I am using Atom editor for React native. I am trying to install eslint. But got some warnings while running npm install commannd.
Firstly I have install both linter-eslint and eslint packages in Atom.
I have created a file .eslintrc and put below piece of code
{
“extends”: “eslint-config-google”
}
I have run the command npm install --save-dev eslint-config-rallycoding from root level of my project. But got below warnings and eslint is not working as well.
npm WARN deprecated eslint-plugin-class-property#1.1.0: please use eslint-plugin-babel and babel/semi
npm WARN deprecated circular-json#0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm WARN rollback Rolling back node-pre-gyp#0.12.0 failed (this is probably harmless): EPERM: operation not permitted, lstat 'D:\ReactNative\albums\node_modules\fsevents\node_modules'
npm WARN acorn-jsx#5.0.1 requires a peer of acorn#^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-jsx-a11y#2.2.3 requires a peer of eslint#^2.10.2 || 3.x but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-import#1.16.0 requires a peer of eslint#2.x - 3.x but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-react#6.10.3 requires a peer of eslint#^2.0.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
I have also tried to uninstall packages and re-install them but its not working.

Installed npm but command not found

I'm installing the following package on Linux Mint
https://github.com/frida/frida-compile
I try to install it by
~ $ sudo npm install frida-compile
npm WARN saveError ENOENT: no such file or directory, open '/home/david/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/home/david/package.json'
npm WARN david No description
npm WARN david No repository field.
npm WARN david No README data
npm WARN david No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ frida-compile#5.3.7
updated 1 package in 2.883s
[!] 2 vulnerabilities found [21344 packages audited]
Severity: 2 Low
Run `npm audit` for more detail
And when I run frida-compile on the command line, I get
frida-compile: command not found
Any idea what the issue is here?
I am running Node 8.11.1

npm install -g #angular/cli command does not install angular cli

I am creating a sample angular2 web app. For that i have installed node.js (v 7.1.0)and NPM (v 3.10.9).
and now after opening system command prompt when I execute the command :
NPM install -g #angular/cli
to install angular cli I am getting the following shown results.
After doing ng -v to check the version of cli installed I am not getting the version number.
Is the cli not installed correctly?
or do I need to set any path variable in environment var?
What has to be done here? Please advise.
C:\Users\27727>d:
D:\>cd learn-angular
D:\learn-angular>npm i -g #angular/cli
npm WARN gentlyRm not removing C:\Users\27727\AppData\Roaming\npm\ng.cmd as it w
asn't installed by C:\Users\27727\AppData\Roaming\npm\node_modules\#angular\cli
npm WARN gentlyRm not removing C:\Users\27727\AppData\Roaming\npm\ng as it wasn'
t installed by C:\Users\27727\AppData\Roaming\npm\node_modules\#angular\cli
C:\Users\27727\AppData\Roaming\npm\ng -> C:\Users\27727\AppData\Roaming\npm\node
_modules\#angular\cli\bin\ng
C:\Users\27727\AppData\Roaming\npm
`-- #angular/cli#1.7.0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\#a
ngular\cli\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#
1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\#a
ngular\cli\node_modules\webpack-dev-server\node_modules\chokidar\node_modules\fs
events):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#
1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)
npm WARN ajv-keywords#3.1.0 requires a peer of ajv#^6.0.0 but none was installed
.
D:\learn-angular>ng -v
'ng' is not recognized as an internal or external command,
operable program or batch file.
D:\learn-angular>
In your system please check this path ( C:\Program Files\nodejs ) is there in environment variables.

How to install Webpack into existing Angular application?

I tried to install Webpack into an existing directory of a project using this command:
npm install --save-dev webpack
However, it returns the following errors:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN extract-text-webpack-plugin#2.1.2 requires a peer of webpack#^2.2.0 but none was installed.
npm WARN webpack-dev-server#2.4.5 requires a peer of webpack#^2.2.0 but none was installed.
How do I fix this and install Webpack?
It seems that you are running this on Win32 according to
wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
Try to update your node/npm version.
Check out a version manager for node. For windows you can try this one.
Edit:
Author did not respond.
Things tried that might have worked:
npm install -f
npm install webpack#2.2.0

Not able to install angularfire2 via npm

I am trying to install angularfire2 from npm by running, but I keep getting this error
D:\angular\firebase\apartment>npm install angularfire2 firebase --save
apartment#0.0.0 D:\angular\firebase\apartment
+-- angularfire2#4.0.0-rc.1
`-- firebase#4.1.3
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN angularfire2#4.0.0-rc.1 requires a peer of #angular/common#^4.0.0 but none was installed.
npm WARN angularfire2#4.0.0-rc.1 requires a peer of #angular/compiler#^4.0.0 but none was installed.
npm WARN angularfire2#4.0.0-rc.1 requires a peer of #angular/core#^4.0.0 but none was installed.
npm WARN angularfire2#4.0.0-rc.1 requires a peer of #angular/platform-browser#^4.0.0 but none was installed.
npm WARN angularfire2#4.0.0-rc.1 requires a peer of #angular/platform-browser-dynamic#^4.0.0 but none was installed.
Last 5 of npm warn's are due to dependencies. You don't have the required modules to install angularfire.
Two possible solutions are, either downgrade your npm i.e. lower than 3.
npm < 3 can download the depending modules by itself or install the 5 depending modules first.

Resources