Ionic-cli: npm install fails while creating new application with CLI because of node-sass v4.5.3

Created on 15 Jan 2018  ·  3Comments  ·  Source: ionic-team/ionic-cli

Description:

The url for binding.node file does not exist. Updating the nde-sass dependency to v4.7.2 might fix it.

Steps to Reproduce:

  1. ionic start my-app
  2. error in npm install

Output:

Small snippet of output

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5.3/win32-x64-59_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.5.3/win32-x64-59_binding.node":
HTTP error 404 Not Found

My ionic info:

CLI: 3.19.0

Other Information:

System:

Node : v9.3.0
npm  : 5.6.0
OS   : Windows 10

Most helpful comment

3.1.8 is out!

All 3 comments

Work-around steps:

  1. sudo npm i -g n install the handy n tool to switch between node versions

  2. n 8.5.0

  3. PROFIT!! (for me at least, npm installs)

Details:

Had the same issue here. It's a huge bummer especially because I encountered it when showcasing a brand new dev to Ionic.

Downgrading to node v8.5.0 (using the handy n tool) seems to fix it.

Noticed that after downgrading node's version, the binary getting requested is https://github.com/sass/node-sass/releases/download/v4.5.3/linux-x64-57_binding.node (instead of linux-x64-59 which was giving an HTTP 404 to the caller file scripts/install.js).

The previous version throwing the error was node v9.4.0.

Hope this helps @mhartington and anyone else coming from Google.

Fix from Ionic Team
Run this command in your project after creation

npm i @ionic/app-scripts@nightly

Should fix the node-sass issue. They are planning to patch this bug where this version of node-sass is not supported in the mentioned node version.

3.1.8 is out!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

phyr0s picture phyr0s  ·  3Comments

mpaland picture mpaland  ·  3Comments

chsakell picture chsakell  ·  3Comments

rashnk picture rashnk  ·  3Comments

jgw96 picture jgw96  ·  3Comments