Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

npm install error - No compatible version found: fs@0.0.2 #13743

Closed
dotannn opened this issue Aug 23, 2016 · 44 comments
Closed

npm install error - No compatible version found: fs@0.0.2 #13743

dotannn opened this issue Aug 23, 2016 · 44 comments

Comments

@dotannn
Copy link

dotannn commented Aug 23, 2016

I'm opening this issue because:

Hi, I suddenly started to get weird errors after npm install, although didn't change anything

What's going wrong?

i get npm ERR! No compatible version found: fs@0.0.2

supporting information:

npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm WARN deprecated cross-spawn-async@2.2.4: cross-spawn no longer requires a build toolchain, use it instead!
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14
npm ERR! Linux 3.19.0-47-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v6.2.2
npm ERR! npm v3.9.5

npm ERR! No compatible version found: fs@0.0.2
npm ERR! Valid install targets:
npm ERR! 0.0.1-security
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request:
npm ERR! /home/dotan/work/code/personify/orderingbot/npm-debug.log

@adamchenwei
Copy link

adamchenwei commented Aug 23, 2016

samething here!

part of the log

358730 info postinstall node-sass@3.8.0
358731 verbose unsafe-perm in lifecycle true
358732 verbose unlock done using /home/vagrant/.npm/_locks/node-sass-9894a549776d5f33.lock for /home/vagrant/web/app/node_modules/gulp-sass/node_modules/node-sass
358733 verbose about to build /home/vagrant/web/app/node_modules/gulp-sass
358734 info build /home/vagrant/web/app/node_modules/gulp-sass
358735 info install gulp-sass@2.3.2
358736 info postinstall gulp-sass@2.3.2
358737 verbose unlock done using /home/vagrant/.npm/_locks/gulp-sass-6091a8f93f433587.lock for /home/vagrant/web/app/node_modules/gulp-sass
358738 verbose stack Error: version not found: fs@0.0.2
358738 verbose stack     at setData (/usr/lib/node_modules/npm/lib/cache/add-named.js:137:12)
358738 verbose stack     at RES (/usr/lib/node_modules/npm/node_modules/inflight/inflight.js:23:14)
358738 verbose stack     at f (/usr/lib/node_modules/npm/node_modules/once/once.js:17:25)
358738 verbose stack     at fixName (/usr/lib/node_modules/npm/lib/cache/add-named.js:29:5)
358738 verbose stack     at saved (/usr/lib/node_modules/npm/lib/cache/caching-client.js:173:7)
358738 verbose stack     at /usr/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:210:7
358738 verbose stack     at FSReqWrap.oncomplete (fs.js:95:15)
358739 verbose statusCode 404
358740 verbose cwd /home/vagrant/web/app
358741 error Linux 3.10.0-327.22.2.el7.x86_64
358742 error argv "/usr/bin/node" "/usr/bin/npm" "install" "--no-bin-links"
358743 error node v0.12.9
358744 error npm  v2.14.9
358745 error version not found: fs@0.0.2
358746 error If you need help, you may report this error at:
358746 error     <https://github.com/npm/npm/issues>

@jfortier-haptiq
Copy link

jfortier-haptiq commented Aug 23, 2016

+1 here

Going to:
https://registry.npmjs.org/fs

Reveals some security messages such as: "This package name is not currently in use, but was formerly occupied by another package. To avoid malicious use, npm is hanging on to the package name, but loosely, and we'll probably give it to you if you want it."

So to me it sounds like a 404, but because it was previously registered they're not allowing another package to take it's place. I tried widening the version scope in package.json file to see if maybe it was just deprecated for a newer version. None that I can see.

@dotannn
Copy link
Author

dotannn commented Aug 23, 2016

I found that there are two packages in my dependencies who provoke this error :

  1. npm (i don't know why but I had it in my dependencies)
    1. paycryptor https://github.com/richardgirges/paycryptor

@srikiraju
Copy link

+1 here

2865 silly fetchPackageMetaData Error: No compatible version found: fs@0.0.2
2865 silly fetchPackageMetaData Valid install targets:
2865 silly fetchPackageMetaData 0.0.1-security
2865 silly fetchPackageMetaData
2865 silly fetchPackageMetaData     at pickVersionFromRegistryDocument (/Code/web-ux/env/lib/node_modules/npm/lib/fetch-package-metadata.js:170:16)
2865 silly fetchPackageMetaData     at /Code/web-ux/env/lib/node_modules/npm/node_modules/iferr/index.js:13:50
2865 silly fetchPackageMetaData     at /Code/web-ux/env/lib/node_modules/npm/lib/utils/pulse-till-done.js:19:8
2865 silly fetchPackageMetaData     at saved (/Code/web-ux/env/lib/node_modules/npm/lib/cache/caching-client.js:174:7)
2865 silly fetchPackageMetaData     at /Code/web-ux/env/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:210:7
2865 silly fetchPackageMetaData     at FSReqWrap.oncomplete (fs.js:82:15)
2865 silly fetchPackageMetaData  error for fs@0.0.2 [Error: No compatible version found: fs@0.0.2
2865 silly fetchPackageMetaData Valid install targets:
2865 silly fetchPackageMetaData 0.0.1-security
2865 silly fetchPackageMetaData ]

@adamchenwei
Copy link

How to bring important ticket to attention to the npm admin???

@jfortier-haptiq
Copy link

jfortier-haptiq commented Aug 23, 2016

Apparently the 'fs' package is now part of the npm core, and is no longer required for import. I simply removed the package from my package.json file, did another npm installand was able to build using gulp with no issues. Just sucks for those of us that maintain slightly dated products. http://stackoverflow.com/questions/24594796/node-js-npm-install-fs-error

Edit: Why all the down vote?

Edit 2: Sorry people who have dependencies inside their own package.json files. Track them down with npm ls. No reason to down vote though IMO.

leog added a commit to leog/git-pre-commit that referenced this issue Aug 23, 2016
Apparently the 'fs' package is now part of the npm core, and is no longer required for import.
npm/npm#13743 (comment)
@srikiraju
Copy link

srikiraju commented Aug 23, 2016

How can we determine which of the dependencies has fs as it's dependency?
npm ls only shows the dep-graph for stuff that's installed.

@VictorSage
Copy link

My package does not directly reference fs package. How do we know which one create this dependency?

@prashanthparsi
Copy link

Happening for me as well. Any solutions or thoughts?

@DVLP
Copy link

DVLP commented Aug 23, 2016

Same problem,
I downgraded to 0.0.1-security to see if this will help

@adamchenwei
Copy link

Wait, for node apps that use earlier version like 0.12.9, what should we do

@codingmaven
Copy link

Same issue here

@prashanthparsi
Copy link

prashanthparsi commented Aug 23, 2016

I had the fs dependency listed in package.json. I removed it and npm install is running now.

@rameshthoomu
Copy link

same issue here.. What to do..

@adamchenwei
Copy link

One of our dependencies has dependencies, that includes "fs": "0.0.2",. I think that is the issue for us.

@chrisbolin
Copy link

If you don't depend on it directly, you can use npm ls to find which of your dependencies depends on fs. If you are super lucky, you might have control over that dependency.

@VictorSage
Copy link

VictorSage commented Aug 23, 2016

remove the line make npm install works. There should be other solutions.

NiklasMerz added a commit to NiklasMerz/ng-cordova that referenced this issue Aug 23, 2016
@srikiraju
Copy link

@chrisbolin My npm ls does not list fs@0.0.2, yet npm install tries to install it. I believe npm ls only lists packages that are currently installed

@DVLP
Copy link

DVLP commented Aug 23, 2016

To fix the problem delete this line

"fs": "0.0.2",
from your package.json

Beginners(like my team over a year ago) put this dependency in their code but it's a built-in so there's no need to install this.

@quantizor
Copy link

It's a built-in, don't know why people are putting that in their dependencies...

@robwalch
Copy link

Found the dep, but still wondering why this was ignored by the registry until recently...

@zkat
Copy link
Contributor

zkat commented Aug 23, 2016

Hey y'all -- this is not really an official response cause I still gotta talk to folks, but hang in there: you don't need fs at all, because it's built-in with Node, and installing the fs package was not doing anything for you. It is entirely safe (and recommended) that you remove this dependency.

For those of you with transitive dependencies asking for this package, stand by for that to get fixed, and a more official explanation of what's up. :)

@adamchenwei
Copy link

adamchenwei commented Aug 23, 2016

@zkat is fs default dep for node version 0.12.9 that not required to import?

@zkat
Copy link
Contributor

zkat commented Aug 23, 2016

@adamchenwei It has been a native node module since forever, afaik, and you literally never needed to npm install fs, for any version of node.

@zkat zkat closed this as completed Aug 23, 2016
@seldo
Copy link
Contributor

seldo commented Aug 23, 2016

TLDR: Human error, specifically this human. I approved unpublishing it instead of deprecating it because I didn't properly check the deps count.

@zkat zkat added the registry label Aug 23, 2016
jonfreedman added a commit to symphonyoss/hubot-symphony that referenced this issue Aug 23, 2016
@jokeyrhyme
Copy link

I highly recommend checking the names of modules that are built-in to Node.js:

You should NOT be using npm or package.json to install any packages that have the same names as the built-in modules.

@YurySolovyov
Copy link

YurySolovyov commented Aug 24, 2016

I just went ahead and created issues for the first page of npm search for dependencies of fs, but doing it manually is hard.
I encourage everyone to go ahead and reach to the rest of module authors and get this fixed.
Snippet I used

# title
No need to use fs as npm dependency

# body
Hi!
`fs` is a node core module, there is no need to include it as npm dependency
See https://github.com/npm/npm/issues/13743

kazazor pushed a commit to kazazor/git-pre-commit that referenced this issue Aug 24, 2016
* Removing fs dependency + Bumping up version

Apparently the 'fs' package is now part of the npm core, and is no longer required for import.
npm/npm#13743 (comment)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests