How to fix the "npm install error" when installing "Botkit"? - node.js

I am a newbie machine learning programmer trying get how to install the botkit tool for creating AI messaging bots from the bot kit studio.
Botkit was installed but the following errors are shown in my terminal:
Rakeshs-MacBook-Air:~ niharika$ npm install
npm WARN enoent ENOENT: no such file or directory, open '/Users/niharika/package.json'
npm WARN niharika No description
npm WARN niharika No repository field.
npm WARN niharika No README data
npm WARN niharika No license field.
Rakeshs-MacBook-Air:~ niharika$ npm install --productions
npm WARN enoent ENOENT: no such file or directory, open '/Users/niharika/package.json'
npm WARN niharika No description
npm WARN niharika No repository field.
npm WARN niharika No README data
npm WARN niharika No license field.
I can't seem to figure out what the package.json file is supposed to be in order to run botkit studio.

This error does not have much to do with Botkit, but more to do with where you are running the npm install. You are running it in your /Users/niharika path. If you cloned down botkit into that directory then you will need to cd into it first. Your path will look more like /Users/niharika/botkitslackstarter/. Then run npm install which will look for a package.json in the root and install all dependencies so then you will be able to run node bot.js to start the application. Best of luck.

Step 1:
npm install
Step 2:
npm install botkit

Related

Why am I getting an error when trying to install and run npm?

I am trying to install and run npm in a linux environment. I have executed the below code to try and achieve this
nvm install v11.0.0
nvm use v11.0.0
npm install
npm start
When I execute npm install in the command line I keep getting the following error message. Any advice to help this run is much appreciated.
npm WARN saveError ENOENT: no such file or directory, open '/home/andrewoca/PycharmProjects/pythonProject/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/home/andrewoca/PycharmProjects/pythonProject/package.json'
npm WARN pythonProject No description
npm WARN pythonProject No repository field.
npm WARN pythonProject No README data
npm WARN pythonProject No license field.
npm install is looking for package.json in order to see what it needs to do. Since you dont have it - you get the errors.
See https://docs.npmjs.com/cli/v7/commands/npm-install
Before running npm install, create an npm project.
This can be done with npm init -y
Now you can use npm install <package name>

unable to upgrade node js latest version

I'm trying to upgrade the node latest version not working but npm is upgraded to latest version and I don't have admin access.
I'm getting following error, When use this comment npm install node#latest
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\Des
ktop\foldername\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Deskto
p\react\package.json'
npm WARN react No description
npm WARN react No repository field.
npm WARN react No README data
npm WARN react No license field.
Try adding -g flag to your command to specify that it is a global install.

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.
It seems that the problem was due to that I forgot to cd into the functions directory before I tried to install the dependencies.

What am I missing when getting these errors installing Node on OSX?

Running npm install node (done successfully before on other machines) but now getting the following
npm WARN saveError ENOENT: no such file or directory, open '/Users/USERID/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/Users/USERID/package.json'
npm WARN USERID No description
npm WARN USERID No repository field.
npm WARN USERID No README data
npm WARN USERID No license field.
Not sure what to do and searching around didn't yield results
Tried running via sudo
Tried installing from the Node website pkg
Searched around stackoverflow
Hoping to get this installed.
npm is a package manager for Node.js, and is not itself used to install Node.js.
You will want to either:
Download the pkg from here and install it: https://nodejs.org/en/download/
Use a package manager like nvm: https://github.com/nvm-sh/nvm
I recommend you get the LTS version.

npm install from tgz created with npm pack

I've created a .tgz file with npm pack. When trying to install it npm prints out the following error:
D:\tmp>npm install package-0.0.1.tgz
npm WARN saveError ENOENT: no such file or directory, open 'D:\tmp\package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open 'D:\tmp\package.json'
npm WARN tmp No description
npm WARN tmp No repository field.
npm WARN tmp No README data
npm WARN tmp No license field.
It looks like npm for some reason does not extract the contents of my .tgz package, meaning all the .js files, package.json etc. although everything is there. Apparently it only tries to install the dependencies listed in my package.
Should it really work this way or I'm doing something wrong?
This error means you are not in a directory that has a package.json file and you are using the command that installs a package as a dependency into an existing, (local) npm project's package.json.
To install your package globally (just to test if it can be installed):
npm install -g package-0.0.1.tgz
Or, if you want to install/add it as a dependency to some other npm project (like a test harness), first make sure that npm project has a package.json, and then :
test-harness-dir> npm install package-0.0.1.tgz

Resources