Problem: Upgrading to release/2015-09-19.18 - node-zopfli not accessible on amazonaws

429 views
Skip to first unread message

Lennart Nordgreen

unread,
Oct 8, 2015, 6:06:50 AM10/8/15
to Canvas LMS Users
Hi guys.

While upgrading to release/2015-09-19.18  I get an error when compiling the zopfli node module due to it not being accessible via the specified URL https://node-zopfli.s3.amazonaws.com/Release/zopfli-v1.4.0-node-v11-linux-x64.tar.gz

Is anyone else experiencing  this problem or have a remedy for it?

Can I find the zopfli-v1.4.0-node-v11-linux-x64.tar.gz file somewhere else?

Error stack

> node-...@1.4.0 install /var/www/canvas/node_modules/brandable_css/node_modules/node-zopfli
> node-pre-gyp install --fallback-to-build

node-pre-gyp http GET https://node-zopfli.s3.amazonaws.com/Release/zopfli-v1.4.0-node-v11-linux-x64.tar.gz
node-pre-gyp http 403 https://node-zopfli.s3.amazonaws.com/Release/zopfli-v1.4.0-node-v11-linux-x64.tar.gz
node-pre-gyp http 403 status code downloading tarball https://node-zopfli.s3.amazonaws.com/Release/zopfli-v1.4.0-node-v11-linux-x64.tar.gz (falling back to source compile with node-gyp)
make: Entering directory `/var/www/canvas/node_modules/brandable_css/node_modules/node-zopfli/build'
  CXX(target) Release/obj.target/zopfli/src/zopfli-binding.o
In file included from ../node_modules/nan/nan_new.h:193,
                 from ../node_modules/nan/nan.h:188,
                 from ../src/zopfli-binding.h:5,
                 from ../src/zopfli-binding.cc:3:
../node_modules/nan/nan_implementation_pre_12_inl.h: In static member function ‘static v8::Local<v8::FunctionTemplate> Nan::imp::Factory<v8::FunctionTemplate>::New(void (*)(const Nan::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Value>, v8::Local<v8::Signature>)’:
../node_modules/nan/nan_implementation_pre_12_inl.h:97: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object
In file included from ../src/zopfli-binding.h:5,
                 from ../src/zopfli-binding.cc:3:
../node_modules/nan/nan.h: At global scope:
../node_modules/nan/nan.h:316: error: ‘REPLACE_INVALID_UTF8’ is not a member of ‘v8::String’
../node_modules/nan/nan.h: In function ‘void Nan::SetAccessor(v8::Local<v8::ObjectTemplate>, v8::Local<v8::String>, void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<void>&), v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, Nan::imp::Sig)’:
../node_modules/nan/nan.h:1872: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object
../node_modules/nan/nan.h:1877: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object
../node_modules/nan/nan.h: In function ‘bool Nan::SetAccessor(v8::Local<v8::Object>, v8::Local<v8::String>, void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<void>&), v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute)’:
../node_modules/nan/nan.h:1915: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object
../node_modules/nan/nan.h:1924: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object
../node_modules/nan/nan.h: In function ‘void Nan::SetNamedPropertyHandler(v8::Local<v8::ObjectTemplate>, void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Integer>&), void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Boolean>&), void (*)(const Nan::PropertyCallbackInfo<v8::Array>&), v8::Local<v8::Value>)’:
../node_modules/nan/nan.h:1962: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object
../node_modules/nan/nan.h:1967: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object
../node_modules/nan/nan.h:1973: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object
../node_modules/nan/nan.h:1979: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object
../node_modules/nan/nan.h:1985: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object
../node_modules/nan/nan.h: In function ‘void Nan::SetIndexedPropertyHandler(v8::Local<v8::ObjectTemplate>, void (*)(uint32_t, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(uint32_t, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(uint32_t, const Nan::PropertyCallbackInfo<v8::Integer>&), void (*)(uint32_t, const Nan::PropertyCallbackInfo<v8::Boolean>&), void (*)(const Nan::PropertyCallbackInfo<v8::Array>&), v8::Local<v8::Value>)’:
../node_modules/nan/nan.h:2032: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object
../node_modules/nan/nan.h:2037: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object
../node_modules/nan/nan.h:2043: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object
../node_modules/nan/nan.h:2049: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object
../node_modules/nan/nan.h:2055: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object
make: *** [Release/obj.target/zopfli/src/zopfli-binding.o] Error 1
make: Leaving directory `/var/www/canvas/node_modules/brandable_css/node_modules/node-zopfli/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Linux 2.6.32-573.3.1.el6.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/var/www/canvas/node_modules/brandable_css/node_modules/node-zopfli/lib/binding/node-v11-linux-x64/zopfli.node" "--module_name=zopfli" "--module_path=/var/www/canvas/node_modules/brandable_css/node_modules/node-zopfli/lib/binding/node-v11-linux-x64"
gyp ERR! cwd /var/www/canvas/node_modules/brandable_css/node_modules/node-zopfli
gyp ERR! node -v v0.10.36
gyp ERR! node-gyp -v v0.10.6
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/var/www/canvas/node_modules/brandable_css/node_modules/node-zopfli/lib/binding/node-v11-linux-x64/zopfli.node --module_name=zopfli --module_path=/var/www/canvas/node_modules/brandable_css/node_modules/node-zopfli/lib/binding/node-v11-linux-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/var/www/canvas/node_modules/brandable_css/node_modules/node-zopfli/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
node-pre-gyp ERR! stack     at maybeClose (child_process.js:766:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:833:5)
node-pre-gyp ERR! System Linux 2.6.32-573.3.1.el6.x86_64
node-pre-gyp ERR! command "node" "/var/www/canvas/node_modules/brandable_css/node_modules/node-zopfli/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /var/www/canvas/node_modules/brandable_css/node_modules/node-zopfli
node-pre-gyp ERR! node -v v0.10.36
node-pre-gyp ERR! node-pre-gyp -v v0.6.12
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/var/www/canvas/node_modules/brandable_css/node_modules/node-zopfli/lib/binding/node-v11-linux-x64/zopfli.node --module_name=zopfli --module_path=/var/www/canvas/node_modules/brandable_css/node_modules/node-zopfli/lib/binding/node-v11-linux-x64' (1)
npm ERR! weird error 1
Binary downloaded and installed at /var/www/canvas/node_modules/brandable_css/node_modules/node-sass/vendor/linux-x64-11/binding.node

> node...@3.3.3 postinstall /var/www/canvas/node_modules
> node scripts/build.js


module.js:340
    throw err;
          ^
Error: Cannot find module '/var/www/canvas/node_modules/scripts/build.js'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:929:3
npm ERR! not ok code 0

Simon Williams

unread,
Oct 8, 2015, 11:34:56 AM10/8/15
to canvas-l...@googlegroups.com
Hey Lennart, you need to upgrade Node to version 0.12.7

Simon

--

---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Graham Ballantyne

unread,
Oct 8, 2015, 12:02:14 PM10/8/15
to canvas-l...@googlegroups.com
Also `cd gems/canvas_i18nliner && rm -rf node-modules && npm install`. The maintainer of node-zopfli removed the precompiled binary because it wasn't working on some Linux distros (coughRHELcough).


--
Graham Ballantyne
IT Services
Simon Fraser University

Lennart Nordgreen

unread,
Oct 28, 2015, 5:49:55 AM10/28/15
to Canvas LMS Users, gra...@sfu.ca
Thanks guys.

I took some time to get this working but finally I used nvm to install and switch to node v.0.10.40 ( withnpm v1.4.28) only to update en left then "native" node version for runtime and it seems to work okay... for now :p

There was one error but I guess it is fines since it says "Finished: 'compile css (including custom brands)' in 4.815944798"


error compiling sass [TypeError: Cannot call method 'parse' of undefined] TypeError: Cannot call method 'parse' of undefined
    at cssFilename (/vagrant/node_modules/brandable_css/lib/main.js:617:51)
    at cacheFor$ (/vagrant/node_modules/brandable_css/lib/main.js:107:20)
    at tryCatch (/vagrant/node_modules/babel-core/node_modules/regenerator/runtime.js:61:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/vagrant/node_modules/babel-core/node_modules/regenerator/runtime.js:323:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/vagrant/node_modules/babel-core/node_modules/regenerator/runtime.js:94:21)
    at invoke (/vagrant/node_modules/babel-core/node_modules/regenerator/runtime.js:132:37)
    at enqueueResult (/vagrant/node_modules/babel-core/node_modules/regenerator/runtime.js:183:19)
    at new Promise (/vagrant/node_modules/babel-core/node_modules/core-js/modules/es6.promise.js:181:7)
    at AsyncIterator.enqueue (/vagrant/node_modules/babel-core/node_modules/regenerator/runtime.js:182:18)
    at AsyncIterator.prototype.(anonymous function) [as next] (/vagrant/node_modules/babel-core/node_modules/regenerator/runtime.js:94:21)
    at Object.runtime.async (/vagrant/node_modules/babel-core/node_modules/regenerator/runtime.js:210:14)
    at cacheFor (/vagrant/node_modules/brandable_css/lib/main.js:94:29)
    at callee$2$0$ (/vagrant/node_modules/brandable_css/lib/main.js:179:57)
    at tryCatch (/vagrant/node_modules/babel-core/node_modules/regenerator/runtime.js:61:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/vagrant/node_modules/babel-core/node_modules/regenerator/runtime.js:323:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/vagrant/node_modules/babel-core/node_modules/regenerator/runtime.js:94:21) Cannot call method 'parse' of undefined
--> Finished: 'compile css (including custom brands)' in 4.815944798
 
Br,
Lennart Nordgreen
IT-department
University of Bergen

Reply all
Reply to author
Forward
0 new messages