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.
Related
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
i am trying to build an ionic project in ubuntu 18.04. but I am getting an error like it cannot build in ubuntu environment.
I have rebuild node-sass folder as well. After that I am getting error as gulf.file cannot find.
here is the error i am getting
copy files from your old project folder except node_module
then paste them in the new path
run
if cordova not installed
npm install -g cordova
then run
npm install -g ionic
npm install
if any error shows
run
npm audit fix
I'm having this error with Ionic 3 for any command I launch even ionic -v
Error
at FatalException.Exception (/usr/lib/node_modules/ionic/node_modules/#ionic/cli-utils/dist/lib/errors.js:8:23)
at FatalException (/usr/lib/node_modules/ionic/node_modules/#ionic/cli-utils/dist/lib/errors.js:17:9)
at Config. (/usr/lib/node_modules/ionic/node_modules/#ionic/cli-utils/dist/lib/config.js:60:35)
at throw (native)
at rejected (/usr/lib/node_modules/ionic/node_modules/#ionic/cli-utils/dist/lib/config.js:5:65)
name: 'Exception', exitCode: 1, fatal: true
I tried uninstalling ionic then reinstalling but the error persisted.
Any help or recommendation would be very much appreciated.
Check the ionic config.json file, great chance it is empty or corrupt based on this error. To get to the file location do the following.
Open up your terminal and go to your root directory
cd /
Next get to the .ionic folder.
cd Users/<User>/.ionic
Once here check the config.json to see its contents. Like I said it is most likely empty or corrupt so go ahead and delete it, then reinstall Ionic and that should fix your issue.
Possibly try npm prune which removes unnecessary node file relative to you project
If all else fails then rm -rf node_modules then npm install(be careful with this as it clears all npm data)
delete node_module folder and re-run npm install command , it works .
Getting below error when running command ionic platform add android
Error: ENOENT, no such file or directory _____\.cordova\lib\android\cordova\3.5.1\VERSION'
I am providing step by step installation of ionic along with cordova.
Have a look it may help you :
First install node to get started using this link
open cmd to install cordova using following command
$ sudo npm install -g cordova
(Drop sudo from the above command if running on Windows)
install ionic using command
$ sudo npm install -g ionic
Create project after selecting directory where project file will be stored,
through CMD,by following command
ionic start {project name} {template type} e.g
ionic start todo blank
Once your project is created go to your newly created project: cd .\new project. for e.g.
D:\Projects>cd.\todo
Now you have to add both android and ios to your project in order to test the build so you need to follow below commands
ionic cordova platform add android
ionic cordova platform add ios
I think in your case you are missing step 5.
I have installed the module with node version v0.10.22
sudo npm install -g ionic
But know when I am trying to start an new application I am getting a
-bash command not found
which ionic
gives me nothing, do I have to add the path to on the $PATH variable ?
How did you installed npm? If you used homebrew then npm won't put npm files accessible by users.
Add export PATH=/usr/local/share/npm/bin:$PATH to your .bashrc/.bash_profile/.zshrc file and it should work fine.
Also refer this: Bower: "command not found" after installation