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

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

Related

How can i install npm moduls on atom?

I want to install the bcrypt package and im using the "npm install bcrypt --python=python2" and i can this after i run it:
bcrypt#5.0.0 install C:\Users\User\node_modules\bcrypt
node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using needle for node-pre-gyp https download
[bcrypt] Success: "C:\Users\User\node_modules\bcrypt\lib\binding\napi-v3\bcrypt_lib.node" is installed via remote
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\User\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\User\package.json'
npm WARN User No description
npm WARN User No repository field.
npm WARN User No README data
npm WARN User No license field.
+ bcrypt#5.0.0
updated 1 package and audited 130 packages in 2.951s
1 package is looking for funding
run `npm fund` for details
found 0 vulnerabilities
I don't get any module in atom.
This is an error that tells you that current folder you are working in does not have a node project set up, its missing the necessary package.json file (every node project has one and needs one).
There are 2 types of "install" with npm, first is global that that you mark with -g flag (npm install bcrypt -g), this will install whatever package into global node modules that can be executed from the node command line, the second one is installing / adding it to your project.
In order to add anything to your project you need to create your project, create a folder for your project, open cmd line and navigate to the folder, and run npm init, this will create a package.json file (after you answer few questions), then npm install whatever will add the package automatically to the package.json file. (there is also a --save-dev flag that adds node module to dev dependencies)

How do i Solve the following error while runnin npm install mysqljs/mysql?

I wanted to install the Mysql into my node.js project. I tried to install it using these commands
npm install mysqljs/mysql
npm install mysql
but I got the following error
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\cbshr\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\cbshr\package.json'
npm WARN cbshr No description
npm WARN cbshr No repository field.
npm WARN cbshr No README data
npm WARN cbshr No license field.
npm install mysqljs/mysql
npm install mysql
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\cbshr\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\cbshr\package.json'
npm WARN cbshr No description
npm WARN cbshr No repository field.
npm WARN cbshr No README data
npm WARN cbshr No license field.
You need to run your terminal from the folder that contains your project. Based on the message, the terminal is running from C:\Users\cbshr\.
In Windows, shift-rightclick in the folder and choose "Open Command Window Here' or use the cd command to navigate to the folder containing your project.

Error regarding file directory in cmd

After performing the commands cd C:\Users\USERNAME\Desktop\Lenny-Boio
and npm install discord.io winston --save I have been acquainted with the following message:
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\USERNAME\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\USERNAME\package.json'
npm WARN USERNAME No description
npm WARN USERNAME No repository field.
npm WARN USERNAME No README data
npm WARN USERNAME No license field.
+ discord.io#2.5.3
+ winston#2.4.0
updated 2 packages in 0.818s
I have node.js already installed.
Do you want to install a package for a specific project? If so, it's best to create a new directory for that project and run npm init first.
This creates a package.json file in your project directory, which contains your project's Node.js configuration and package dependencies (like discord.io and winston in your case).
You can find more information here: https://docs.npmjs.com/getting-started/using-a-package.json

How to Uninstall node-gyp on windows through command line

I want to uninstall node-gyp from windows 8.1 through command line is there any way to uninstall it i tried it using command
npm uninstall node-gyp
from below link I installed node-gyp
Link to node-gyp
but it didnt work for me i got the following error
C:\Windows\system32>npm uninstall node-gyp
npm WARN enoent ENOENT: no such file or directory,
open'C:\Windows\system32\pac kage.json'
npm WARN system32 No description
npm WARN system32 No repository field. npm WARN system32 No
README data
npm WARN system32 No license field.
You need to make sure your working directory is at
nodejs\node_modules\npm
Then run
npm uninstall node-gyp
and it should successfully uninstall.

not able to install anything using npm in node

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

Categories

Resources