salyela
salyela

Reputation: 1655

Module 'googleapis' is not listed as dependency in package.json

Step 1: I try to add googleapis as dependency and got the error

$ npm install googleapis
npm WARN saveError ENOENT: no such file or directory, open '[home]/package.json'
npm WARN enoent ENOENT: no such file or directory, open '[home]/package.json'
npm WARN saly No description
npm WARN saly No repository field.
npm WARN saly No README data
npm WARN saly No license field.

Question: Why is it looking for the file in my home directory as opposed to my project directory? Especially since I am making the call from my project directory.

Step 2: I misunderstood the error and proceeded to deploying my project and that's where I got the error

Module 'googleapis' is not listed as dependency in package.json

Step 3: I now try npm i googleapis --save but I still get the same errors as in steps 1 and 2.

Upvotes: 1

Views: 1487

Answers (1)

salyela
salyela

Reputation: 1655

It seems that the problem was due to that I forgot to cd into the functions directory before I tried to install the dependencies.

Upvotes: 3

Related Questions