ionic eroor: 'libsass' bindings not found try reinstalling node-sass? - ionic-framework

I would like to run ionic application.
I use this commandeionic serve
I get this error :
Error 'libsass' bindings not found try reinstalling node-sass?
I've tried npm rebuild node-sass
I've tried to uninstall node-sass and install glup-sass : npm install --save-dev gulp-sass but nothing works for me
Someone can help me please ?

Related

Ionic 6: unknown option '--npm-client'

I have a project with ionic 6 and capacitor, when I run ionic serve it work like a charm and I can see the project in my browser, but then when I run ionic capacitor build android I got this error:
error: unknown option '--npm-client'
[ERROR] An error occurred while running subprocess capacitor.
I have tried to use this solution, but it didn't work.
It says to:
npm uninstall -g ionic
npm uninstall -g #ionic/cli
npm install -g #ionic/cli
but I still get the same error. Someone already got the same error before?
Thanks!
npm uninstall -g ionic
npm install -g #ionic/cli#latest
Try this
I fix it updating to the last version with this, because the upgrade commands didn't work for me.
cd /tmp
wget https://registry.npmjs.org/#ionic/cli/-/cli-6.19.0.tgz
sudo npm -g install cli-6.19.0.tgz
I had the same issue and had to upgrade from node 14 to node 16.15 to make it work.
This issue is caused by older version of ionic-cli, you should upgrade the CLI version.

IONIC : A utility CLI has unexpectedly closed

I got this error when i run ionic serve
The Ionic CLI will exit. Please check any output above for error details.
my ionic info
$ionic info
Ionic:
ionic (Ionic CLI) : 4.0.1 (C:\Users\Pc\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : ionic-angular 3.9.2
#ionic/app-scripts : 3.1.8
Cordova:
cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.0.0
System:
Android SDK Tools : 25.3.1
NodeJS : v6.10.1 (C:\Program Files\nodejs\node.exe)
npm : 5.3.0
OS : Windows 10
Environment:
ANDROID_HOME : C:\Users\Pc\AppData\Local\Android\sdk
Run the below command, being in root directory of Ionic project:
npm install #ionic/app-scripts#latest --save-dev
Then you can try Ionic serve or Ionic s.
I had a similar issue:
Assertion `args[1]->IsString()' failed.
A utility CLI has unexpectedly closed
I fixed that by installing natives lib through npm:
npm i natives
Simpy run
npm install #ionic/app-scripts#latest --save-dev
and then
ionic serve
This error is because of some audit during installing a plugin or adding a plug in
I had a similar issue. I tried several different solutions, and for some reason different ones worked on different machines. Because I'm an illogical masochist, I attempted to fix this issue in the same project on 3 different laptops instead of sending the new fixed version to the other laptops.
The best answer I came up with is to:
Delete node_modules
copy node_modules from a different project (I used an earlier version of my app)
run npm i to install any missing modules
I think this approach should work for almost all instances.
You must kill the NodeJs service I believe it's a bug
Try replacing the package.json scripts parts. Worked for me.
"scripts": {
"build": "ionic build",
"serve": "ionic build",
"start": "npm run serve"
},
Try running:
npm install #ionic/lab
Maybe there is an issue in your hosts file. Make sure your ::1 should enable or not commented.
Example:
I don't know why but using sudo was the only way to solve this on my ubuntu machine!
I just needed to run the command using sudo:
sudo ionic serve
Error: Lock found, but no process with PID 43470 seems to be running.
[ng] (If you are sure no ngcc process is running then you should delete the lock-file at yourproject/node_modules/#angular/compiler-cli/ngcc/ngcc_lock_file.)
rm yourproject/node_modules/#angular/compiler-cli/ngcc/ngcc_lock_file
et voila.
if you get this in the log:
The target entry-point "#ionic-native/media-capture" has missing
dependencies:
#ionic-native/core
try this,
npm install --save #ionic-native/core
My solution:
Upgrade Angular. It'll reveal the real reason for unexpectedly closing in a more verbouse error message. Mine was incompatible dependencies. I simply edited package.json with the right depencies, and ran npm update
For any Linux Users: This error might occur if you installed node.js via the snapstore. Either change PATH to /usr/local/bin/node or use npm to update/install node.js again at the right place.

Unable to install ionic using npm

I am unable to install ionic using npm. Found the similar questions but there is no solution.
C:\Users\xxxx>npm install -g ionic
I am getting npm error.
It would be great if you provide the solution early.
Thankyou.

MODULE_NOT_FOUND: ionic serve

I am getting this error when i did ionic serve. Can anyone explain? Tried to update npm install still getting this error.
I got the same error and I was able to fix it. My environment is mac but try this
npm i
if it asks update ionic-cli, select Y
npm rebuild node-sass
At step 3, I got exact message to rebuild sass.

Missing Module in gulpfile 'clone-stats'

I am working with ionic and my ionic build android command isn't working.
The error message I get is "Uh oh! Looks like you're missing a module in your gulp file: Cannot find module 'clone-stats'
Do you need to run 'npm install'?
I highlighted my steps in the image below:
I have no idea what 'clone-stats' is and why it is missing. It was working yesterday.
I have tried to reinstall ionic. I tried npm install -g. I tried removing and adding the android platform back. ionic serve gives me the same error.
I am not familiar with gulp. Does anybody know the problem?
Thanks.
You have required to install 'clone-stats' module.
open terminal
go to your project folder and type npm install clone-stats.
if you facing permission error then use sudo npm install clone-stats
hope it's work for you..