I need some helps to solve problems with ionic on my mac. For every command I launch from terminal with ionic, I receive the same error as shown below.
For example even if I give command ionic -v, I receive this:
$ ionic -v
/usr/local/lib/node_modules/ionic/dist/index.js:24
const [xcode, iosDeploy, iosSim,] = yield Promise.all([
^
SyntaxError: Unexpected token [
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:387:25)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (/usr/local/lib/node_modules/ionic/bin/ionic:8:11)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
I have checked the file /usr/local/lib/node_modules/ionic/dist/index.js, but all is fine. Even there's this parse error, I even tried with uninstall and reinstalled ionic without success. Can someone give me suggestions please?
I have solved this! My nodejs version was too old (5.6.0) and I have seen that it doesn't work with ionic cli, so I have installed before nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash
and then launch from terminal -> nvm install v6.10.3 to have last stable node js version, now all works again!
Just remove nodejs from your linux :
sudo apt remove nodejs
And install the latest version :
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs
This come from the official website
This did the trick for me, Hope it helps :)
I got the same issue. But After re installed latest version (7) of node.js .
It is working Properly.
1st I did flowing command on Ubuntu.
npm cache clean -f
npm install npm -g
2nd
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - sudo
apt-get install -y nodejs
Try this.
On Mac, I am able to solve it using upgrading node using following command :
nvm install node --reinstall-packages-from=node
Related
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.
I am a newbie in mongo db and trying to install in my Mac Big Sur OS. It is a public beta OS.
While install the Mongo DB, I am getting the below error:
Error: An exception occurred within a child process:
NoMethodError: undefined method 'path' for nil:NilClass
Did you mean paths?
I have the latest Xcode installed. The steps I followed are from Official MongoDB documentation url.
Please help if there is a solution.
My case wasn't with installing MongoDB, but had the same problem when installing Vault using Homebrew.
After running brew doctor, my problem was with outdated Command Line Tools.
I followed the instruction shown in the error message.
However, the first solution didn't updated my command line tools.
$ softwareupdate --all --install --force
So I followed the second solution, and was able to install Vault successfully.
$ sudo rm -rf /Library/Developer/CommandLineTools
$ sudo xcode-select --install
I installed Yarn on my Ubuntu 16.04 server.
Setup flow:
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
and then
sudo apt-get update && sudo apt-get install yarn
Apparently it doesn't end with an error:
...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
But when I run yarn --version I get this error
root#AMS-148750:~# yarn --version
/usr/share/yarn/lib/cli.js:46083
let {
^
SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/usr/share/yarn/bin/yarn.js:24:13)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
Please let me know how to fix it. Thank you in advance.
that is because your node version is incompatible with yarn.Check your node version with node -version if you have an older version of node then upgrade it to latest version by using:
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
apt-get install -y nodejs
This looks like a too old nodejs version for the version of yarn installed from the repo. Please check the requirements for the yarn version you installed and make sure your server fulfills them.
There could be another reason for that. Your nodejs version is very old. You just need to upgrade your nodejs with below command (using npm).
sudo npm install -g n
sudo n stable
This will upgrade to latest stable version.
Worked for me.
I've got such error because I'm using nvm but I didn't install any node version :stuck_out_tongue_closed_eyes:
nvm list
N/A
iojs -> N/A (default)
node -> stable (-> N/A) (default)
unstable -> N/A (default)
Just install node version which you need, for example
nvm install 13.3.0
I cannot load VSCOde onto my old Toshiba laptop using Fedoa23. I follow the instructions from the web and finally get the message "No package code availale". I have previously installes VSCode on an old computer using Fedora23 but this time it does not work? Where do I go wrong?
Thanks.
Don't know, but this works for me.
You can use these step to install VSCode:
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
Then update the package cache and install the package using dnf (Fedora 22 and above):
dnf check-update
sudo dnf install code
Or on older versions using yum:
yum check-update
sudo yum install code
I need to host website to google firebase hosting.
I looked almost everywhere but steel have the problem.
I have installed npm install --global firebase also npm install -g firebase-tools but when I want to use firebase command it says : "command not found"
firebase-tools "-bash: firebase: command not found"
Firebase Hosting set up issue
https://github.com/firebase/firebase-tools/issues/46
this posts didn't helped
this is after sudo npm install --global firebase-tools
alias firebase="`npm config get prefix`/bin/firebase"
I forgot to install Firebase Tools after a long time away from it on new computer... Use npm i firebase --save to set your project up and npm install -g firebase-tools to install the tools for e.g. serving your app locally, etc.
In macOS:
You can use this query
curl -sL https://firebase.tools | bash