Error running npm install and start: "npm WARN tar ENOENT: no such file or directory, open"

Asked

Viewed 4,858 times

-1

I’m getting some errors running some files on Node.js. I downloaded 2 files on Github, and in a tutorial simply tells to run the following commands:

npm install

npm start

The Operating System is Windows 10.

First I installed Node.JS. Then I opened windows Powershell and walked to the file folder.

The command dir returns the following folders and files:

C:\Users\Evarist\Desktop\yEarn\iearn-finance-master\iearn-finance-master>dir
 O volume na unidade C não tem nome.
 O Número de Série do Volume é 1CE1-A159

 Pasta de C:\Users\Evarist\Desktop\yEarn\iearn-finance-master\iearn-finance-master

06/09/2020  15:28    <DIR>          .
06/09/2020  15:28    <DIR>          ..
03/09/2020  11:45               317 .gitignore
03/09/2020  11:45             1.062 LICENSE
06/09/2020  15:28    <DIR>          node_modules
03/09/2020  11:45         1.474.998 package-lock.json
03/09/2020  11:45             1.860 package.json
03/09/2020  11:45    <DIR>          public
03/09/2020  11:45             2.898 README.md
03/09/2020  11:45    <DIR>          src
               5 arquivo(s)      1.481.135 bytes
               5 pasta(s)    9.335.443.456 bytes disponíveis

The command npm install the result came out:

   C:\Users\Evarist\Desktop\yEarn\iearn-finance-master\iearn-finance-master>npm install
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Evarist\Desktop\yEarn\iearn-finance-master\iearn-finance-master\node_modules\.staging\bip39-5f8d4250\package.json'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Evarist\Desktop\yEarn\iearn-finance-master\iearn-finance-master\node_modules\.staging\bip39-5f8d4250\index.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Evarist\Desktop\yEarn\iearn-finance-master\iearn-finance-master\node_modules\.staging\hdkey-41e89c69\package.json'
    [.....]

The files I downloaded:

https://github.com/iearn-finance/iearn-finance

https://github.com/iearn-finance/itoken

How to solve this?

3 answers

0

I removed package.json and package-lock.json. the program returns the following error:

C:\Users\Evarist\Desktop\finances\itoken-master\itoken-master>npm install
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\Evarist\Desktop\finances\itoken-master\itoken-master\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Evarist\Desktop\finances\itoken-master\itoken-master\package.json'
npm WARN itoken-master No description
npm WARN itoken-master No repository field.
npm WARN itoken-master No README data
npm WARN itoken-master No license field.

up to date in 1.588s
found 0 vulnerabilities

0

So the entire Node project needs package.json. It’s responsible for uploading everything your project needs. If your project doesn’t have Packge.json it won’t be able to understand where it has to download libraries, other necessary data and the like.

Do the following, download the project again and give the npm install

0

Do the following:

  • renames your folder to finance
  • enter the folder and remove the node_modules, the package json. and the package-lock.json
  • then runs npm install
  • Hello, good evening. Thank you for commenting. Unfortunately it is NPM that creates the node_modules folder, and this folder is empty. I removed the other two files. Below is the error in the result:

Browser other questions tagged

You are not signed in. Login or sign up in order to post.