aickin / shrink-ray

Node.js compression middleware
MIT License
268 stars 21 forks source link

Latest version of iltorb causes SyntaxError #9

Open pkboy opened 7 years ago

pkboy commented 7 years ago

iltorb was recently updated to version 1.1.0 to use ES2015.

package.json is pulling the latest. Should probably have it get 1.0.13 instead

/var/node_modules/shrink-ray/node_modules/iltorb/index.js:10
const encode = require('./build/bindings/encode.node');
^^^^^
SyntaxError: Use of const in strict mode.
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/var/node_modules/shrink-ray/index.js:22:14)
pkboy commented 7 years ago

Mistake on my side, turns out I was using the wrong version that didn't have the version set to 1.0.13.

pkboy commented 7 years ago

Actually, the latest version is 0.1.4, which has the updated package.json that has iltorb@1.0.13 set as the dependency but the latest version available from npm is 0.1.3

npm ERR! notarget No compatible version found: shrink-ray@0.1.4
npm ERR! notarget Valid install targets:
npm ERR! notarget 0.1.3, 0.1.2, 0.1.1, 0.1.0, 0.0.1
nstepien commented 7 years ago

Which version of Node are you using?

pkboy commented 7 years ago

Node 6.9.1, npm 4.4.4 On my dev environment it (shrink-ray@0.1.3 with iltorb@1.2.0) works fine, but after deploying to elastic beanstalk it started crashing as I had above.

It is very likely an issue on my end but I can't get shrink-ray @ 0.1.4, which has iltorb @ 1.0.13 (pre-change to ES2015) as the dependency, from npm.

Right now I just stopped using shrink-ray temporarily to keep working on my project, and I'm not comfortable enough with my current AWS knowledge to somehow put in shrink-ray@0.1.4 through somewhere other than npm install.

So I will have to wait for this current version to be published to npm before I try again.