Meteor-Community-Packages / meteor-scss

Node-sass wrapped to work with meteor.
MIT License
311 stars 72 forks source link

Cannot download "darwin-arm64-83_binding.node" #314

Open klaucode opened 2 years ago

klaucode commented 2 years ago

meteor version: 2.7.1

fourseven:scss version: fourseven:scss@4.15.0

After migration of Meteor project from Ubuntu to MacOS, I get the error during start of meteor (there is not problem with proxy, network or etc, because on same MacOS machine, when I will install directly with npm exactly same version of node-sass, it will install it successfully). Problem is, the dependency of fourtyseven:scss - node-sass, which cannot be downloaded.

I opened question also in Meteor forum [Meteor forum](https://forums.meteor.com/t/fourseven-scss-package-problem-during-installation-node-sass-on-macos/58002)

Logs:

Errors prevented startup:                  

   While loading package fourseven:scss@4.15.0:
   error: Command failed:
   /Users/nodsec/.meteor/packages/meteor-tool/.2.5.6.2hd4yu.rdoie++os.osx.arm64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.arm64/dev_bundle/bin/npm rebuild
   --update-binary
   Cannot download "https://github.com/sass/node-sass/releases/download/v4.14.1/darwin-arm64-83_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 [
   gyp verb cli
   '/Users/nodsec/.meteor/packages/meteor-tool/.2.5.6.2hd4yu.rdoie++os.osx.arm64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.arm64/dev_bundle/bin/node',
   gyp verb cli
   '/Users/nodsec/.meteor/packages/fourseven_scss/.4.15.0.1rapaaw.w56q++os+web.browser+web.browser.legacy+web.cordova/plugin.compileScssBatch.os/npm/node_modules/meteor/compileScssBatch/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 verb cli ]
   gyp info using node-gyp@3.8.0
   gyp info using node@14.18.3 | darwin | arm64
   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` failed Error: not found: python2
   gyp verb `which` failed     at getNotFoundError

Thanks a lot for an each help :-)

klaucode commented 2 years ago

...I tried to check the url of the package, which is using by npm and its: https://registry.npmjs.org/node-sass/-/node-sass-4.14.1.tgz and Meteor downloading package from: https://github.com/sass/node-sass/releases/download/v4.14.1/darwin-arm64-83_binding.node Probably the package is missing on GitHub..

internetErik commented 2 years ago

I'm encountering the same issue as above

uzair120 commented 2 years ago

me too. same issue. any solution?

faburem commented 2 years ago

I experienced the same issue on my M2 Macbook Air. While the error message would indicate something completely different, this can be solved by installing python 2 which is not installed on MacOS by default anymore.

brew install pyenv
pyenv install 2.7.18
export PATH="$(pyenv root)/shims:${PATH}"

All credit goes to the stackoverflow answer provided here: https://stackoverflow.com/questions/68935932/install-python2-on-mac-with-m1-chip

mblandongiraldo commented 1 year ago

fourseven:scss@4.15.0 seems to no longer depend on node-sass, if you are using version lower than 4.15.0, please upgrade.

Worked for me.

67726e commented 3 weeks ago

I experienced the same issue on my M2 Macbook Air. While the error message would indicate something completely different, this can be solved by installing python 2 which is not installed on MacOS by default anymore.

brew install pyenv
pyenv install 2.7.18
export PATH="$(pyenv root)/shims:${PATH}"

All credit goes to the stackoverflow answer provided here: https://stackoverflow.com/questions/68935932/install-python2-on-mac-with-m1-chip

I'm trying to install the package on an effectively clean installation of Linux Mint 22 and cannot get it working. I just go from one node-gyp error to another by installing via brew and pyenv.

In my case I cloned a copy of this repository down to my machine in order to use a slightly forked version with the non-deprecated, pure-JS implementation:

  1. Update the node-sass import statement in /plugin/compile-scss.js
// import sass from 'node-sass';
import sass from 'sass';
  1. Update the node-sass declaration for the Meteor Package definition in /package.js
    // "node-sass": '9.0.0',
    'sass': '1.77.8',

At this point, one can create a symlink in their Meteor applications /packages directory, i.e.

~/source/meteor/app$ ls
client
node_modules
package.json
package-lock.json
packages
server
settings
tests
tsconfig.json
~/source/meteor/app$ ls -l packages/
meteor-scss -> /home/$USER/source/meteor-scss

At this point one can run meteor add fourseven:scss and Meteor will use the local package rather than pulling the published, official package from their artifact repository.