Solved: "ionic start" already failing with 404 (node-sass not found)


#1

Trying to get my first Ionic app to run following the tutorial. Installed ionic and cordova, but it crashes already when trying to set up an application template using ionic start myApp tabs

Downloading the starter seems to work fine, but the subsequent npm i fails after a while:

[ERROR] An error occurred while running npm i (exit code 1):

        > node-sass@4.5.3 install D:\Repositories\Commercial\ridr.taxi\TestApp\node_modules\node-sass
        > node scripts/install.js

        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

#2

What is your ionic info output?


#3
    @ionic/cli-utils  : 1.18.0
    ionic (Ionic CLI) : 3.18.0
System:
    Node : v9.2.0
    npm  : 5.5.1
    OS   : Windows 10

Misc:
    backend : pro

#4

My guess is that the scripts simply contain an invalid dependency? The node-sass URL in the command line output indeed points to a resource that doesn’t exist (anymore).


#5

You are using a node version that was released yesterday (or today, depending on your timezone). My guess is that this is not yet ready for that node version. You should install the TLS.


#6

I just tried updating to the current version and got the error:
Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (59) For more information on which environments are supported please see: https://github.com/sass/node-sass/releases/tag/v4.5.3 at module.exports (D:\Projects\stemapp\node_modules\node-sass\lib\binding.js:13:13) at Object.<anonymous> (D:\Projects\stemapp\node_modules\node-sass\lib\index.js:14:35) at Module._compile (module.js:641:30) at Object.Module._extensions..js (module.js:652:10) at Module.load (module.js:560:32) at tryModuleLoad (module.js:503:12) at Function.Module._load (module.js:495:3) at Module.require (module.js:585:17) at require (internal/module.js:11:18) at Object.<anonymous> (D:\Projects\stemapp\node_modules\@ionic\app-scripts\dist\core\bundle-components.js:6:16)

So yeah I would just downgrade your Node version. @hardcodet

Edit: After downgrading ionic works again for me


#7

Yeah, we suggest in our setup docs that folks install LTS version of Node for this reason.
The speed at which node can move/upgrades makes depending on Node9 pretty crazy.
Constant updates make it hard for libs that require native compilation (node-sass, node-gyp) hard to keep up with.

They do their best, but using the LTS version of node is your best bet.


#8

Downgrading did the job - thanks for the quick replies! :slight_smile: