Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm install jquery error / saveError ENOENT / Invalid dependency

I'm having trouble to resolve this issue. I've searched around but not getting anywhere. I've just started learning MEAN Stack. I'm trying to install all components for the Stack. (I currently have programs installed for Python Stack and Ruby Stack). Not sure if those will have anything to do with my problem. I'm still new to programming. Any info would be greatly appreciated.

Here is what I'm running currently:

  • MacOS Sierra v10.12.5
  • Node v8.0.0
  • npm v5.0.0

I've installed:

$ npm install nodemon

(-g)..global was giving me a problem so I installed without it.

$ npm install bower

(-g)..global was also giving me a problem so I installed without it.

Then when I tried to install:

$ npm install jquery

I was getting errors. Here is what it says..

npm WARN saveError ENOENT: no such file or directory, open '/Users/jaepark75/package.json'  
npm WARN enoent ENOENT: no such file or directory, open  '/Users/jaepark75/package.json'  
npm WARN jaepark75 No description  
npm WARN jaepark75 No repository field.  
npm WARN jaepark75 No README data  
npm WARN jaepark75 No license field.  
npm WARN jaepark75 Invalid dependency: balanced-match undefined 
npm WARN jaepark75 Invalid dependency: block-stream undefined  
npm WARN jaepark75 Invalid dependency: brace-expansion undefined  
npm WARN jaepark75 Invalid dependency: concat-map undefined  
npm WARN jaepark75 Invalid dependency: fs.realpath undefined  
npm WARN jaepark75 Invalid dependency: fstream undefined  
npm WARN jaepark75 Invalid dependency: glob undefined  
npm WARN jaepark75 Invalid dependency: graceful-fs undefined  
npm WARN jaepark75 Invalid dependency: hammerjs undefined  
npm WARN jaepark75 Invalid dependency: inflight undefined  
npm WARN jaepark75 Invalid dependency: inherits undefined  
npm WARN jaepark75 Invalid dependency: materialize-css undefined  
npm WARN jaepark75 Invalid dependency: minimatch undefined  
npm WARN jaepark75 Invalid dependency: minimist undefined  
npm WARN jaepark75 Invalid dependency: mkdirp undefined  
npm WARN jaepark75 Invalid dependency: node-archiver undefined  
npm WARN jaepark75 Invalid dependency: once undefined  
npm WARN jaepark75 Invalid dependency: path-is-absolute undefined 
npm WARN jaepark75 Invalid dependency: rimraf undefined  
npm WARN jaepark75 Invalid dependency: tar undefined  
npm WARN jaepark75 Invalid dependency: wrappy undefined

added 1 package in 2.742s

Thank you for taking the time to look at this.

like image 290
user7565287 Avatar asked Mar 08 '23 22:03

user7565287


1 Answers

I had the same problem and after many errors it finally works. I deleted the files I had and restarted with these steps in the order stated:

Go to the directory you want to work in and create a folder named "node" for example

$ cd /directory/

$ mkdir node

You will need package.json so:

$ npm init

Then download express which creates node_modules where the download of jquery goes into

$ npm install express

Then install jQuery with a capital instead of without, i then tried without a capital after

$ npm install jQuery

Then npm install all other needed packages and

$ npm update

Hope this works for you :)

The link below contains a great step through of how to go from there, after it has been downloaded to using it:

https://code.tutsplus.com/tutorials/how-to-scrape-web-pages-with-nodejs-and-jquery--net-22478

like image 102
lcodegmaster Avatar answered Mar 11 '23 11:03

lcodegmaster