Felix Fong Felix Fong - 2 months ago 8x
Node.js Question

Install NodeJS package locally

When i try to install package on my local directory using

npm install connect
,but it just keep pop up some warning about

no such file or directory, open '/Users/felixfong/package.json'

But i don't not want to install package at my computer directory,i want to install at my local web app directory


Are you sure you are inside your local web app directory when you run the npm install connect command?

cd app-directory/
npm install connect

Also ensure that a package.json file is also present in the app-directory.

If it isn't present, you can use npm init command to create the package.json file interactively.