Error: Missing binding when using ionic serve - node-modules

I am trying to serve my ionic project. but when i run ionic serve it give me the following error!
Module build failed (from ./node_modules/sass-loader/lib/loader.js):
[ng] Error: Missing binding /home/gideon/node_modules/node-sass/vendor/linux-x64-57/binding.node
I have tried to run "$ npm rebuild node-sass" but it stii gave me error.
I also deleted the node-sass folder and ran again "$npm install" but still not going and returning the same error.
ERROR in ./src/global.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/global.scss)
[ng] Module build failed (from ./node_modules/sass-loader/lib/loader.js):
[ng] Error: Missing binding /home/gideon/node_modules/node-sass/vendor/linux-x64-57/binding.node
[ng] Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 8.x
[ng]
[ng] Found bindings for the following environments:
[ng] - Linux 64-bit with Node.js 10.x
[ng]
[ng] This usually happens because your environment has changed since running `npm install`.
[ng] Run `npm rebuild node-sass` to download the binding for your current environment.
[ng] at module.exports (/home/gideon/node_modules/node-sass/lib/binding.js:15:13)
[ng] at Object.<anonymous> (/home/gideon/node_modules/node-sass/lib/index.js:14:35)
[ng] at Module._compile (module.js:653:30)
[ng] at Object.Module._extensions..js (module.js:664:10)
[ng] at Module.load (module.js:566:32)
[ng] at tryModuleLoad (module.js:506:12)
[ng] at Function.Module._load (module.js:498:3)
[ng] at Module.require (module.js:597:17)
[ng] at require (internal/module.js:11:18)
[ng] at Object.sassLoader (/home/gideon/IONIC/ionic-news-app-master/node_modules/sass-loader/lib/loader.js:46:72)
[ng] ERROR in ./src/theme/variables.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/theme/variables.scss)
[ng] Module build failed (from ./node_modules/sass-loader/lib/loader.js):
[ng] Error: Missing binding /home/gideon/node_modules/node-sass/vendor/linux-x64-57/binding.node
[ng] Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 8.x
[ng]
[ng] Found bindings for the following environments:
[ng] - Linux 64-bit with Node.js 10.x
[ng]
[ng] This usually happens because your environment has changed since running `npm install`.
[ng] Run `npm rebuild node-sass` to download the binding for your current environment.
[ng] at module.exports (/home/gideon/node_modules/node-sass/lib/binding.js:15:13)
[ng] at Object.<anonymous> (/home/gideon/node_modules/node-sass/lib/index.js:14:35)
[ng] at Module._compile (module.js:653:30)
[ng] at Object.Module._extensions..js (module.js:664:10)
[ng] at Module.load (module.js:566:32)
[ng] at tryModuleLoad (module.js:506:12)
[ng] at Function.Module._load (module.js:498:3)
[ng] at Module.require (module.js:597:17)
[ng] at require (internal/module.js:11:18)
[ng] at Object.sassLoader (/home/gideon/IONIC/ionic-news-app-master/node_modules/sass-loader/lib/loader.js:46:72)
[ng] ERROR in ./src/app/home/home.page.scss
[ng] Module build failed (from ./node_modules/sass-loader/lib/loader.js):
[ng] Error: Missing binding /home/gideon/node_modules/node-sass/vendor/linux-x64-57/binding.node
[ng] Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 8.x
[ng]
[ng] Found bindings for the following environments:
[ng] - Linux 64-bit with Node.js 10.x
[ng]
[ng] This usually happens because your environment has changed since running `npm install`.
[ng] Run `npm rebuild node-sass` to download the binding for your current environment.
[ng] at module.exports (/home/gideon/node_modules/node-sass/lib/binding.js:15:13)
[ng] at Object.<anonymous> (/home/gideon/node_modules/node-sass/lib/index.js:14:35)
[ng] at Module._compile (module.js:653:30)
[ng] at Object.Module._extensions..js (module.js:664:10)
[ng] at Module.load (module.js:566:32)
[ng] at tryModuleLoad (module.js:506:12)
[ng] at Function.Module._load (module.js:498:3)
[ng] at Module.require (module.js:597:17)
[ng] at require (internal/module.js:11:18)
[ng] at Object.sassLoader (/home/gideon/IONIC/ionic-news-app-master/node_modules/sass-loader/lib/loader.js:46:72)
[ng] ℹ 「wdm」: Failed to compile.
PLEASE I REALLY NEED HELP! SOMEONE TO HELP ME ! THANKS IN ADVANCE!

Steps to solve problem
Run
npm rebuild node-sass
to build the binding for your current environment.

Try this
rm -r node_modules
rm package-lock.json
npm install --save-dev node-sass ***or*** npm rebuild node-sass --force
npm install

Related

npm run dev fails in fresh laravel project

NPM run dev fails in a new laravel project.
Its says its has problems in my resources\app.js but this file is empty :|
i tryed:
installing older npm version
installing babel version recommended by other questions
updating composer
Empty cach
rm -rf node_modules && npm cache clean --force && npm install
Here is the error in term:
> # dev /Users/sebastiantramper/code/uniekegerechten
> npm run development
> # development /Users/sebastiantramper/code/uniekegerechten
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
98% after emitting SizeLimitsPlugin
ERROR Failed to compile with 1 errors 16:39:49
error in ./resources/js/app.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Package exports for '/Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/helper-compilation-targets' do not define a '.' subpath
at applyExports (internal/modules/cjs/loader.js:485:15)
at resolveExports (internal/modules/cjs/loader.js:508:12)
at Function.Module._findPath (internal/modules/cjs/loader.js:577:20)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:879:27)
at Function.Module._load (internal/modules/cjs/loader.js:785:27)
at Module.require (internal/modules/cjs/loader.js:956:19)
at require (/Users/sebastiantramper/code/uniekegerechten/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at Object.<anonymous> (/Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/preset-env/lib/debug.js:8:33)
at Module._compile (/Users/sebastiantramper/code/uniekegerechten/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1103:10)
at Module.load (internal/modules/cjs/loader.js:914:32)
at Function.Module._load (internal/modules/cjs/loader.js:822:14)
at Module.require (internal/modules/cjs/loader.js:956:19)
at require (/Users/sebastiantramper/code/uniekegerechten/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at Object.<anonymous> (/Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/preset-env/lib/index.js:11:14)
at Module._compile (/Users/sebastiantramper/code/uniekegerechten/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1103:10)
at Module.load (internal/modules/cjs/loader.js:914:32)
at Function.Module._load (internal/modules/cjs/loader.js:822:14)
at Module.require (internal/modules/cjs/loader.js:956:19)
at require (/Users/sebastiantramper/code/uniekegerechten/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at requireModule (/Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/core/lib/config/files/plugins.js:165:12)
at loadPreset (/Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/core/lib/config/files/plugins.js:83:17)
at createDescriptor (/Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/core/lib/config/config-descriptors.js:154:9)
at /Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/core/lib/config/config-descriptors.js:109:50
at Array.map (<anonymous>)
at createDescriptors (/Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/core/lib/config/config-descriptors.js:109:29)
at createPresetDescriptors (/Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/core/lib/config/config-descriptors.js:101:10)
at /Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/core/lib/config/config-descriptors.js:58:104
at cachedFunction (/Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/core/lib/config/caching.js:62:27)
at cachedFunction.next (<anonymous>)
at evaluateSync (/Users/sebastiantramper/code/uniekegerechten/node_modules/gensync/index.js:244:28)
at sync (/Users/sebastiantramper/code/uniekegerechten/node_modules/gensync/index.js:84:14)
at presets (/Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/core/lib/config/config-descriptors.js:29:84)
at mergeChainOpts (/Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/core/lib/config/config-chain.js:320:26)
at /Users/sebastiantramper/code/uniekegerechten/node_modules/#babel/core/lib/config/config-chain.js:283:7
# multi ./resources/js/app.js ./resources/sass/app.scss
Asset Size Chunks Chunk Names
After updating Node js it worked.

Project created with "tns create" give error with any "ng generate' command

Just trying to learn Nativescript using the Nativescript CLI and an Angular Framewok.
tns create myapp --ng
Then after answering the questions, I move on to:
ng generate --help
Which gives this error:
An unhandled exception occurred: Cannot find module '#schematics/angular/utility/config'
See "/tmp/ng-V5J95L/angular-errors.log" for further details.
The log file contains:
[error] Error: Cannot find module '#schematics/angular/utility/config'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/usr/lib/node_modules/#nativescript/schematics/src/angular-project-parser.js:6:18)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
npm i -D #nativescript/schematics
then
npm i -D #angular/cli
restart the terminal/ command line and then again
ng g c <Component/name>
The solution for me turned out be be because I had installed and was using version 12.x of Node.js, the fix was to use the Long Term Support (LTS) version 10.x of Node.js.

After installing heroku using npm install -g heroku-cli in Windows 8.1, I'm getting this error on heroku --version

After installing heroku using npm install -g heroku-cli in Windows 8.1, I'm getting this error on heroku --version
C:\Users\Lenovo\AppData\Roaming\npm\node_modules\heroku-cli\node_modules\cli-eng
ine\lib\cli.js:70
async run() {
SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\hero
ku-cli\bin\run.js:2:34)
The Heroku CLI requires node >=7.10.0 or greater
Go to the NodeJS website and download the latest version (Now: v8.1.2 Current).
After installation test the Heroku Toolbelt by using the version command in your command line interface:
> heroku version

angular-cli is not installing on osX Sierra

I am using mac osX Sierra When angular-cli was not installing I tried force install , tried installation by yarn but nothing changed those installation said that angular-cli was installed successfully but when i write ng -v or ng --version or ng --help or ng -help all the time i gave me same error massage and i could not work with angular cli :(
success Installed angular-cli#1.0.0-beta.19-3 with binaries:
- ng
✨ Done in 24.96s.
MDSAZIDs-iMac:~ MYMAC$ ng -v
module.js:457
throw err;
^
Error: Cannot find module 'rsvp'
at Function.Module._resolveFilename (module.js:455:15)
at Function.Module._load (module.js:403:25)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/MYMAC/node_modules/angular-cli/node_modules/ember-cli/lib/ext/promise.js:3:15)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)

Error installing testacular with latest version of nodejs 0.8.19

I get the following error when I run below command..
⚡ sudo npm -g install testacular
module.js:340
throw err;
^
Error: Cannot find module 'npmlog'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at /usr/local/bin/npm:19:11
at Object.<anonymous> (/usr/local/bin/npm:87:3)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
Try re-installing node.js - http://nodejs.org/download/
This happened to me after an old version of n failed to install node v0.10.5, then I upgraded n and had it install node. It apparently didn't install npm quite correctly.

Resources