Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fs dependency no longer available on npm #11

Closed
dschreij opened this issue Mar 20, 2017 · 3 comments
Closed

fs dependency no longer available on npm #11

dschreij opened this issue Mar 20, 2017 · 3 comments

Comments

@dschreij
Copy link

I was importing pixi-sound and got the error message:

ERROR in ./~/pixi-sound/lib/Sound.js
Module not found: Error: Can't resolve 'fs' in '/Users/daniel/Sites/osweb/node_modules/pixi-sound/lib'
 @ ./~/pixi-sound/lib/Sound.js 333:17-30
 @ ./~/pixi-sound/lib/deprecations.js
 @ ./~/pixi-sound/lib/index.js

Apparently, the Sound module tries to use the fs (filesystem?) module to read a file from disk, but the fs module is no longer available on npm, according to the readme file of fs:

# Security holding package

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.

You may adopt this package by contacting [email protected] and
requesting the name.

Additionally, the fs module is not listed as a dependency on pixi-sound's npm page.

What's the best approach here? Replace fs with a module with similar functionality?

@dschreij
Copy link
Author

I just realized that fs should be part of the node.js default modules! Strange that it can't find the module on my system then...

@dschreij
Copy link
Author

dschreij commented Mar 20, 2017

This seems to be an issue with webpack, rather than with your library: josephsavona/valuable#9

The problem was solved by adding:

node: {
  fs: 'empty'
}

to the webpack.config.js file.

Sorry for reporting this here. Closing the issue!

@bigtimebuddy
Copy link
Member

Thanks for digging into this @dschreij. Useful information for people using Webpack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants