0

I am following the tutorial on React and Redux on thenewboston Youtube channel, and just can't install dependencies when I navigate to the directory where the files are provided. Here's the link, and I am following exactly the tips from the beginning of the video https://www.youtube.com/watch?v=TSAw5f8mOQs&list=PL6gx4Cwl9DGBbSLZjvleMwldX8jGgXV6a&index=3

This is the error I get:

:~$ npm install
npm ERR! install Couldn't read dependencies
npm ERR! Error: ENOENT, open '/home/joe/package.json'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <[email protected]>

npm ERR! System Linux 3.19.0-56-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/joe
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /home/joe/package.json
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/joe/npm-debug.log
npm ERR! not ok code 0
5
  • You are missing the file package.json Commented Nov 15, 2016 at 20:43
  • well it's inside the folder(the folder I drag into the terminal in order to get path), do I need to put it somewhere else maybe? Commented Nov 15, 2016 at 20:46
  • Your current working directory is /home/joe and you do not have a package.json inside it. Can you show the result of ls -l /home/joe/package.json, cat /home/joe/package.json and cat <backtick here>pwd<backtick here>\package.json Commented Nov 15, 2016 at 20:47
  • What is the folder where you put you package.json? Commented Nov 15, 2016 at 20:51
  • It says No such file or directory, sorry I'm new to this. json is in the folder with other files downloaded from the repo, should I change the working directory and copy it there? Could you please direct me how to do that if possible..? Commented Nov 15, 2016 at 20:56

1 Answer 1

1

You are missing package.json.

There are two possibilities:

You want to create new package.json

If you want to create a new package.json use npm init command to setup your package.json.

You already have some code with a package.json

If you already got some code from some repo, cd to that directory where you have your package.json and do a npm install or npm i

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.