angular: project failed to start after nodejs upgrade to 12.x

My Angular project failed to build and start after upgrading nodejs from 10.x to 12.x with the following message:

Module build failed (from ./node_modules/sass-loader/lib/loader.js):
Error: Missing binding C:\xxx\client\node_modules\node-sass\vendor\win32-x64-72\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 12.x
Found bindings for the following environments:
- Windows 64-bit with Node.js 10.x
This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to download the binding for your current environment.

I try the npm rebuild node-sass, but it still can't work. So what's the issue?

1 answer

  • answered 2019-10-08 03:10 Sudip Sarker

    You can try these following things:

    1. Removing node_modules and then npm i
    2. uninstalling node-sass and then re-installing it.

      npm uninstall node-sass npm i node-sass