I need help to build ionic with iOS i have this problem : - ionic-framework

ionic cordova build ios
ng run app:ionic-cordova-build --platform=ios
Error: Unknown argument: platform
[ERROR] An error occurred while running subprocess ng.
ng run app:ionic-cordova-build --platform=ios exited with exit code 1.
Re-running this command with the --verbose flag may provide more
information.

It looks like you're running into permission issues. If you are installing npm-packages then it might possible that you are getting an EACCES error when trying to install a package globally. This means you do not have permission to write to the directories npm uses to store global packages and commands.
Try running commands:
sudo chmod u+x -R 775 ~/.npm
sudo chown $USER -R ~/.npm
or you can just run any npm command with sudo, that should get resolve your issue.
sudo ionic cordova build ios
I'd recommend you to take a look at https://docs.npmjs.com/getting-started/fixing-npm-permissions

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.

Error: EROFS: read-only file system on ionic installation

I am trying to create an ionic project and running the command:
sudo ionic start helloworld blank
However when I do the terminal outputs
Error: EROFS: read-only file system, mkdir '/helloworld'
Then the process just hangs. I've tried uninstalling and reinstalling npm and ionic, but this problem has not resolved.

How to run electron as root

I try to run electron on may kali linux as where I am the root but it doesn't show anything but it works on my ubuntu where I am not the root.
When I run: npm run electron:start
I get this:
11640:0227/233443.028885:FATAL:atom_main_delegate.cc(211)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
help me please.
The only solution I found is to do it without being root. And until then for it to work when you execute the command "
npx cap open electron
", you must locate the directory of the chrome-sandbox file in the error message where you will have to execute the following two commands:
sudo chown root: root chrome-sandbox
sudo chmod 4755 chrome-sandbox
Generally, here is what I do to use ionic and electron on Kali linux:
1. npm install ngx-electron electron
2. npm install electron-packager --save-dev
3. ionic build
4. npx cap add electron
5. ionic build && npx cap copy
6. npx cap open electron
You can see here for more explanation:
https://gist.github.com/gnopor/d4813628c949294c4ef8b4ef88941f68

error in react-native run-android

I am trying to run my app on the emulator
But where it's going to hang
And others do not
What is the problem?
http://uupload.ir/files/w7jt_hang.png
And after a few minutes this happens
http://uupload.ir/files/x5pw_v.jpg
Try running this command to re-install your packages and clean your cache watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
It could take a couple minutes to run so be patient with it.
This can be achieved by two ways as follows:
1] Please remove node_modules folder of your project and afterward you need to bypass all permission related issues by changing the prefix for npm. Please use below command to bypass all permissions:
npm config set unsafe-perm true
Then use below commands:
npm install
npm start -- --reset-cache
2] You need to run your command prompt(cmd.exe) as administrator.(right click to
command prompt and run as administrator)
Then use below commands:
npm install

Unable to start my first app with ionic

I beginning to learn about the ionic platform and have been following the getting started instructions on their website but have run into problems when trying to start my first application.
Here's what I've done so far:
1 - sudo apt-get install npm
2 - sudo npm install -g ionic#latest
here I got 2 warnings
npm WARN optional Skipping failed optional dependency /ionic/chokidar/fsevents:
and
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.1.3
Next I tried
ionic start --pro-id <id i got from my ionic dashboard>
and got the following error
/usr/bin/env: ‘node’: No such file or directory
Is there something I missed? Would appreciate any suggestions, thanks