I'm new to node.js, and I've been trying to npm install some modules - namely, cheerio, express and request. But I keep getting this:
npm WARN package.json node-web-scrape@0.0.1 No repository field.
npm WARN package.json node-web-scrape@0.0.1 No README data
npm WARN package.json node-web-scrape@0.0.1 No license field.
npm WARN retry will retry, error on last attempt: Error: EBUSY: resource busy or locked, rename 'C:\Users\user\AppData\Local\Temp\npm-16500-38020820\registry.npmjs.org\jsdom\-\jsdom-7.2.2.tgz.1538180439' -> 'C:\Users\user\AppData\Local\Temp\npm-16500-38020820\registry.npmjs.org\jsdom\-\jsdom-7.2.2.tgz'
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "cheerio"
npm ERR! node v4.4.7
npm ERR! npm v2.15.8
But the folder node_modules still appears in my directory. So OK, I try stuff on it. My main.js file has the following:
var request = require('request');
console.log("Hello, World!")
That's all it's got. Immediately, it breaks:
C:\Users\user\Documents\Crawler>node main
module.js:327
throw err;
^
Error: Cannot find module 'process-nextick-args'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (C:\Users\user\Documents\Crawler\node_modules\request\node_modules\bl\node_modules\readable-stream\lib\_stream_duplex.js:21:23)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
Help?
Since you're using npm
version 2.15.8, windows has a limit of folder depth. Update your npm
to npm@3
.
npm install -g npm@3
npm cache clear
Then, delete your node_modules/
before installing the npm modules( cheerio
, express
, request
)
Source: BountySource
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.