Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Module not found: Error: Can't resolve 'fs' #21

Open
gpmcadam opened this issue Mar 13, 2019 · 2 comments
Open

Module not found: Error: Can't resolve 'fs' #21

gpmcadam opened this issue Mar 13, 2019 · 2 comments

Comments

@gpmcadam
Copy link

I've installed this package via npm (npm install --save pixi-compressed-textures) and tried to include it in my project as per the suggested steps for Browserify (I'm actually using webpack.)

I've included it as follows:

import * as PIXI from 'pixi.js';
import TEX from 'pixi-compressed-textures';

I'm getting the following error:

ERROR in ./node_modules/pixi-compressed-textures/lib/crn_decomp.js
Module not found: Error: Can't resolve 'fs' in '/path/to/node_modules/pixi-compressed-textures/lib'

Is this plugin intended to be run in the browser? Am I missing something?

Any help would be appreciated. Thanks!

@ivanpopelyshev
Copy link
Contributor

pixi had the same problem, please look in pixijs issues (maybe closed) for it first and then we can solve this here. Something about switching from fs or path to alternative...

I dont use webpack/browserify personally, but i can check and approve if someone provides a fix.

@ivanpopelyshev
Copy link
Contributor

Or maybe we can make crn_decomp optional, but i dont know how to put separate build in npm :(

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

No branches or pull requests

2 participants