Comments (5)
@krystian50 check for error messages from npm install node-zopfli-es
likely you are missing a prerequisite, it needs python, make, gcc, g++ etc. depending on the platform, see the notes at https://github.com/jaeh/node-zopfli-es
Since it is an "optional" dependency NPM will skip over it if there is an error so a full npm install
will still complete.
from shrink-ray.
@krystian50 were you able to resolve this warning as we are getting it also.
Installed [email protected]
directly with Yarn, no problems there.
On building the project I get a similar error:
warning in ./node_modules/node-zopfli-es/lib/zopfli.js
Critical dependency: the request of a dependency is an expression
(node:10881) [ZOPFLI_COMPAT] MISSING_MODULE: Module "node-zopfli-es" was unavailable
Zopfli compression unavailable; will fall back to gzip.
from shrink-ray.
@H-Gomez @krystian50 any chance you are using Docker? or developing on a different platform and copying your node_modules
? I just got this error on a new project because I forgot to add the .dockerignore
ignoring node_modules
and it was overwriting the native linux build with the files from my Mac.
You can get a better error message by running node -p "require('node-zopfli-es');"
In my case I saw zopfli.node: Exec format error
from shrink-ray.
@kriscarle No docker is being used on the local development environment.
The platform is Mac OSX (10.14) on Node 10.13 and I've removed the node modules and done a fresh yarn
to get all the packages installed again with no resolution.
When running the above command in the project root it returns the Zopli class indicating that it's able to find the package source correctly.
node -p "require('node-zopfli-es');"
{ [Function: Zopfli]
createGzip: [Function],
createZlib: [Function],
createDeflate: [Function],
compress: [Function],
gzip: [Function],
zlib: [Function],
deflate: [Function],
gzipSync: [Function],
zlibSync: [Function],
deflateSync: [Function] }
I can manually edit the zopli-compat.js
inside of node_modules/shrink-ray-current/
to log out the error in the catch statement which gives me:
warning in ./node_modules/node-zopfli-es/lib/zopfli.js
(node:31489) [MODULE_NOT_FOUND] Error: Cannot find module './binding/zopfli.node'
This to me is confusing as I can see the zopfli.node
file exists in node_modules/node-zopfli-es/lib/binding/
.
Not entirely sure what else to try here.
from shrink-ray.
@H-Gomez Possibly something odd on your machine like a permissions issue? I'd recommend setting up a very simple hello world express app, then add shrink-ray-current to that and see if this happens in the simplest test case. If so, you could try upgrading NodeJS (10.13 is from October 2018) or use nvm or Docker to test different environments.
from shrink-ray.
Related Issues (20)
- An in-range update of compressible is breaking the build 🚨 HOT 1
- An in-range update of node-zopfli-es is breaking the build 🚨 HOT 2
- An in-range update of @types/node is breaking the build 🚨 HOT 1
- An in-range update of accepts is breaking the build 🚨 HOT 1
- An in-range update of @types/node is breaking the build 🚨 HOT 1
- Prefer zlib over zopfli for gzip? HOT 7
- Fails to install on node 12 macos HOT 2
- An in-range update of @types/node is breaking the build 🚨 HOT 3
- An in-range update of @types/node is breaking the build 🚨 HOT 3
- An in-range update of compressible is breaking the build 🚨
- Likely memory leak HOT 10
- Types: ShrinkRayOptions.filter should be optional
- Cache: only re-encode if maximum quality wasn't used originally HOT 1
- TypeError: this._implicitHeader is not a function HOT 1
- replace node-zopfli-es by node-zopfli HOT 1
- Node v16.2.0 Fails To Install Shrink-Ray-Current On Windows 10 HOT 3
- Lots of deprecated sub-dependencies HOT 1
- Brotli zlib.constants.BROTLI_MIN_QUALITY defaults to BROTLI_DEFAULT_QUALITY
- Comma is inserted into the encoded text
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shrink-ray.