Ionic Project ([email protected]) Node SASS Error on npm install
MINGW64 ~/Sites/bitbucket/**ionic-app (master)
$ npm install
npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-commonjs.
npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-node-resolve.
npm WARN deprecated [email protected]: babili has been renamed to babel-minify. Please update to babel-minify
npm WARN deprecated [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated [email protected]: This module has been deprecated and is no longer maintained. Please use @rollup/plugin-json.
npm WARN deprecated [email protected]: babili has been renamed to babel-minify. Please update to babel-preset-minify
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated [email protected]: Please update to the latest object-keys
> [email protected] install C:\Users\WebDev\Sites\bitbucket\**ionic-app\node_modules\node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5.3/win32-x64-64_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.5.3/win32-x64-64_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
> [email protected] postinstall C:\Users\WebDev\Sites\bitbucket\**ionic-app\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"
Workaround 1: Tested this but error still occurs - sass/node-sass#2773 (comment)
MINGW64 ~/Sites/bitbucket/**ionic-app (master)
$ npm install --unsafe-perm -g node-sass
C:\Users\WebDev\AppData\Roaming\npm\node-sass -> C:\Users\WebDev\AppData\Roaming\npm\node_modules\node-sass\bin\node-sass
> [email protected] install C:\Users\WebDev\AppData\Roaming\npm\node_modules\node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.13.0/win32-x64-64_binding.node
Download complete
Binary saved to C:\Users\WebDev\AppData\Roaming\npm\node_modules\node-sass\vendor\win32-x64-64\binding.node
Caching binary to C:\Users\WebDev\AppData\Roaming\npm-cache\node-sass\4.13.0\win32-x64-64_binding.node
> [email protected] postinstall C:\Users\WebDev\AppData\Roaming\npm\node_modules\node-sass
> node scripts/build.js
Binary found at C:\Users\WebDev\AppData\Roaming\npm\node_modules\node-sass\vendor\win32-x64-64\binding.node
Testing binary
Binary is fine
+ [email protected]
added 174 packages from 138 contributors in 22.05s
Workaround 2: sass/node-sass#2773 (comment)
$ npm install --global --production windows-build-tools
# waited until finished around 5 minutes
$ npm install
$ npm run ionic:serve
> ionic-hello-world@ ionic:serve C:\Users\WebDev\Sites\bitbucket\**ionic-app
> ionic-app-scripts serve
[16:45:59] ionic-app-scripts 2.0.2
[16:45:59] watch started ...
[16:45:59] build dev started ...
[16:45:59] clean started ...
[16:45:59] clean finished in 7 ms
[16:45:59] copy started ...
[16:45:59] transpile started ...
[16:46:06] transpile finished in 6.72 s
[16:46:06] preprocess started ...
[16:46:06] deeplinks started ...
[16:46:06] deeplinks finished in 291 ms
[16:46:06] preprocess finished in 292 ms
[16:46:06] webpack started ...
[16:46:07] copy finished in 7.38 s
[16:46:14] webpack finished in 7.65 s
[16:46:14] sass started ...
[16:46:18] sass finished in 3.64 s
[16:46:18] postprocess started ...
[16:46:18] postprocess finished in 8 ms
[16:46:18] lint started ...
[16:46:18] build dev finished in 18.72 s
[16:46:18] watch ready in 19.16 s
And it worked!