Solvedmaterialize Error with Meteor 1.6-rc7 and node-sass 4.5.2

Hey,

Expected Behavior

I'm updating my project for meteor 1.6 (actually rc7)

Materialize was working fine before, but now it won't install

Current Behavior

meteor install materialize:materialize
gives the following error logs :

=> Errors while adding packages:

While loading package materialize:materialize@0.100.2:
error: Command failed:
/root/.meteor/packages/meteor-tool/.1.6.0-rc.7.1w2boep++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/npm
rebuild --update-binary
Cannot download
"https://github.com/sass/node-sass/releases/download/v4.5.2/linux-x64-57_binding.node":

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.

export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

npm config set proxy http://example.com:8080
gyp info it worked if it ends with ok
gyp verb cli [
'/root/.meteor/packages/meteor-tool/.1.6.0-rc.7.1w2boep++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node',
gyp verb cli
'/root/.meteor/packages/materialize_materialize/.0.100.2.1g1f5r6.j627++os+web.browser+web.cordova/npm/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library=' ]
gyp info using node-gyp@3.6.1
gyp info using node@8.7.0 | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb which succeeded python2 /usr/bin/python2
gyp verb check python version /usr/bin/python2 -c "import platform; print(platform.python_version());" returned: "2.7.3\n"
gyp verb get node dir compiling against specified --nodedir dev files:
/root/.meteor/packages/meteor-tool/.1.6.0-rc.7.1w2boep++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle
gyp verb build dir attempting to create "build" dir:
/root/.meteor/packages/materialize_materialize/.0.100.2.1g1f5r6.j627++os+web.browser+web.cordova/npm/node_modules/.temp-1nbsveb.21qf/node_modules/node-sass/build
gyp verb build dir "build" dir needed to be created?
/root/.meteor/packages/materialize_materialize/.0.100.2.1g1f5r6.j627++os+web.browser+web.cordova/npm/node_modules/.temp-1nbsveb.21qf/node_modules/node-sass/build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file:
/root/.meteor/packages/materialize_materialize/.0.100.2.1g1f5r6.j627++os+web.browser+web.cordova/npm/node_modules/.temp-1nbsveb.21qf/node_modules/node-sass/build/config.gypi
gyp verb config.gypi checking for gypi file:
/root/.meteor/packages/materialize_materialize/.0.100.2.1g1f5r6.j627++os+web.browser+web.cordova/npm/node_modules/.temp-1nbsveb.21qf/node_modules/node-sass/config.gypi
gyp verb common.gypi checking for gypi file:
/root/.meteor/packages/materialize_materialize/.0.100.2.1g1f5r6.j627++os+web.browser+web.cordova/npm/node_modules/.temp-1nbsveb.21qf/node_modules/node-sass/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /usr/bin/python2
gyp info spawn args [
'/root/.meteor/packages/materialize_materialize/.0.100.2.1g1f5r6.j627++os+web.browser+web.cordova/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args
'/root/.meteor/packages/materialize_materialize/.0.100.2.1g1f5r6.j627++os+web.browser+web.cordova/npm/node_modules/.temp-1nbsveb.21qf/node_modules/node-sass/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args
'/root/.meteor/packages/materialize_materialize/.0.100.2.1g1f5r6.j627++os+web.browser+web.cordova/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args
'/root/.meteor/packages/meteor-tool/.1.6.0-rc.7.1w2boep++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args
'-Dnode_root_dir=/root/.meteor/packages/meteor-tool/.1.6.0-rc.7.1w2boep++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle',
gyp info spawn args
'-Dnode_gyp_dir=/root/.meteor/packages/materialize_materialize/.0.100.2.1g1f5r6.j627++os+web.browser+web.cordova/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=node.lib',
gyp info spawn args
'-Dmodule_root_dir=/root/.meteor/packages/materialize_materialize/.0.100.2.1g1f5r6.j627++os+web.browser+web.cordova/npm/node_modules/.temp-1nbsveb.21qf/node_modules/node-sass',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture x64
gyp verb node dev dir
/root/.meteor/packages/meteor-tool/.1.6.0-rc.7.1w2boep++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle
gyp verb which succeeded for make /usr/bin/make
gyp info spawn make
gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
make: g++ : commande introuvable
make: *** [Release/obj.target/libsass/src/libsass/src/ast.o] Erreur 127
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit
(/root/.meteor/packages/materialize_materialize/.0.100.2.1g1f5r6.j627++os+web.browser+web.cordova/npm/node_modules/node-gyp/lib/build.js:285:23)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:200:12)
gyp ERR! System Linux 3.14.32-xxxx-grs-ipv6-64
gyp ERR! command
"/root/.meteor/packages/meteor-tool/.1.6.0-rc.7.1w2boep++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node"
"/root/.meteor/packages/materialize_materialize/.0.100.2.1g1f5r6.j627++os+web.browser+web.cordova/npm/node_modules/node-gyp/bin/node-gyp.js"
"rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags="
"--libsass_library="
gyp ERR! cwd
/root/.meteor/packages/materialize_materialize/.0.100.2.1g1f5r6.j627++os+web.browser+web.cordova/npm/node_modules/.temp-1nbsveb.21qf/node_modules/node-sass
gyp ERR! node -v v8.7.0
gyp ERR! node-gyp -v v3.6.1
gyp ERR! not ok
Build failed with error code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.5.2 postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.5.2 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional
logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2017-10-12T20_13_31_117Z-debug.log

Possible Solution

As we can see in the log above, there is a 404 when trying to retrieve
https://github.com/sass/node-sass/releases/download/v4.5.2/linux-x64-57_binding.node

And that's normal, this release does not exist : https://github.com/sass/node-sass/releases/tag/v4.5.2

When I want to manually install node-sass 4.5.2, I got the same error, but it works fine with node-sass 4.5.3 which is the last release

So, a possible solution, idk if it's easy for you would be to change in package.json the node-sass version from 4.5.2 to 4.5.3

Steps to Reproduce (for bugs)

  1. Install meteor 1.6.rc7
  2. Try to install materirialize

Context

Can't install materializa with meteor

Your Environment

  • Version used: Materialize 0.100.2

  • Operating System and version (desktop or mobile): ,Debian 7.11 x86_64 GNU/Linux
    meteor 1.6 rc 7
    meteor node -v -> v8.7.0
    meteor npm -v -> 5.4.2

Thanks !

47 Answers

✔️Accepted Answer

Not resolved for me. I also did a fresh install of Meteor 1.6.0.1 and meteor add materialize:materialize failed as described above.

I also tried cloning the current v1-dev branch, but it failed to build with another error message (Error: ENOENT: no such file or directory, open 'E:\myproj\packages\materialize\sass\components\date_picker\_default.date.scss').

So here's my summary of workaround steps for anyone else trying to run this during their first hour with Meteor and getting frustrated with it:

  1. Create a local folder packages in your project and switch into it.
  2. Run git clone https://github.com/Dogfalo/materialize.git. You should now have a directory packages/materialize in your project.
  3. Run git checkout master.
  4. Edit the file packages/materialize/package.json and change
    "node-sass": "^4.5.2",

to

    "node-sass": "^4.5.3",
  1. Now run meteor add materialize:materialize from your project directory again. This time it should succeed!

I would really love for this to be submitted as an update to Atmosphere somehow, so the experience for newcomers like me is a bit smoother!

Other Answers:

The same problem here with Meteor 1.6 release.

But not here https://github.com/Dogfalo/materialize/blob/master/package.json

To fix the issue:

Clone materialize repo in /packages in your meteor directory, then edit package.json and edit line 51 from "node-sass": "^4.5.2", to "node-sass": "^4.5.3",

Now meteor add materialize:materialize works

More Issues: