I am trying to work on an existing angular application. I have cloned the code, installed node.js and angular cli(latest versions). But the existing code was build with older versions of node and angular cli. When I try to application by ng serve, its failing to compile with error
ERROR in ./src/styles.scss (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./src/styles.scss)
Module build failed (from ./node_modules/sass-loader/lib/loader.js):
Error: Missing binding C:\Users\Project\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 5.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.
at module.exports (C:\Users\Project\node_modules\node-sass\lib\binding.js:15:13)
at Object.<anonymous> (C:\Users\Project\node_modules\node-sass\lib\index.js:14:35)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.sassLoader (C:\Users\Project\node_modules\sass-loader\lib\loader.js:46:72)
I am assuming it might be because of the versions, Can some one help me with how do I install dependencies/packages/node-modules to work on an existing Angular project.
Ran npm rebuild node-sass and compilation is successful and app is running on localhost:4200. But I see a blank page in browser on localhost:4200 with error in console.
Uncaught TypeError: Object(...) is not a function
at ng2-charts.js:230
at Module../node_modules/ng2-charts/fesm5/ng2-charts.js (ng2-charts.js:232)
at __webpack_require__ (bootstrap:79)
at Module../src/app/feature/lab/lab.module.ts (index.ts:84)
at __webpack_require__ (bootstrap:79)
at Module../src/app/app.module.ts (app.constant.ts:7)
at __webpack_require__ (bootstrap:79)
at Module../src/main.ts (main.ts:1)
at __webpack_require__ (bootstrap:79)
at Object.0 (main.ts:23)