msr2406's avatar
Level 10

npm install failing - nightmare!

I have a project that started at laravel 5.7 and have upgraded to 6.0

I want to start using vue so composer installed laravel/ui, artisan'd the bootstrap and vue scaffolding and typed npm install.

The first four lines on my screen said:

> [email protected] install /media/mark/97693281-8995-4217-a10a-86b2f12c330f/mark/Laravel/PiScreen/node_modules/node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.0/linux-x64-72_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.9.0/linux-x64-72_binding.node": 

It then started:

Building: /home/mark/.nvm/versions/node/v12.16.1/bin/node /media/mark/97693281-8995-4217-a10a-86b2f12c330f/mark/Laravel/PiScreen/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=

Which eventually failed with incomprehensible errors and warnings.

I checked the github url for the node-sass download with my browser and found that it did not exist.

I have npm version 6.13.4 and node v12.16.1 nvm is version 0.35.3

My package.json is:

    "devDependencies": {
        "axios": "^0.16.2",
        "bootstrap": "^4.0.0",
        "bootstrap-sass": "^3.3.7",
        "cross-env": "^5.0.1",
        "jquery": "^3.2",
        "laravel-mix": "^1.0",
        "lodash": "^4.17.4",
        "popper.js": "^1.12",
        "vue": "^2.1.10"
    },
    "dependencies": {
        "ajv": "^6.5.0"
    }

Anyone fancy a webex to help sort this out or is there somewhere I can go to fix the erroneous node-sass url for starters?

Thanks in anticipation

0 likes
2 replies
owiesnama's avatar

I think it's something related to node version and node-sass version, maybe you can remove the node_modules and the it's cache

rm -r ./node_modules
npm cache clean --force 

and then rebuild node-sass and install the node_modules again

npm rebuild node-sass
npm i 
msr2406's avatar
Level 10

Worked it out. Checked what a vanilla install of a v6 project would put in my dependencies, updated the versions and added a couple of lines like resolve-url-loader, etc. and all installed ok. Lesson learned. :)

1 like

Please or to participate in this conversation.