IONIC start error - ionic-framework

Im trying to fix this issue from 5 hours now and i still can't fix it i'm to start ionic and serve it but i get this error all the time i did everything on the internet to fix but still nothing
Your system information:
Cordova CLI: 6.4.0
Ionic CLI Version: 2.1.7
Ionic App Lib Version: 2.1.4
ios-deploy version: Not installed
ios-sim version: Not installed
OS: macOS Sierra
Node Version: v6.9.1
Xcode version: Not installed
******************************************************
Dependency warning - for the CLI to run correctly,
it is highly recommended to install/upgrade the following:
Install ios-sim to deploy iOS applications.`npm install -g ios-sim` (may require sudo)
Install ios-deploy to deploy iOS applications to devices. `npm install -g ios-deploy` (may require sudo)
i tried all these commands :
sudo npm install ios-sim -g
sudo npm install -g ios-deploy --unsafe-perm=true
npm install -g ios-deploy --allow-root
my ERROR
npm ERR! Darwin 16.1.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "ios-sim"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! path /Users/heshamelmasry/.npm-packages/lib/node_modules/ios-sim
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/Users/heshamelmasry/.npm-packages/lib/node_modules/ios-sim'
npm ERR! at Error (native)
npm ERR! { Error: EACCES: permission denied, access '/Users/heshamelmasry/.npm-packages/lib/node_modules/ios-sim'
npm ERR! at Error (native)
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/Users/heshamelmasry/.npm-packages/lib/node_modules/ios-sim' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/heshamelmasry/Desktop/npm-debug.log

Related

Can't install Ionic 3

I couldn't install ionic. Can you help me?
Alexanders-MacBook-Air:~ alexander$ npm install -g #ionic/cli
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/alexander/.npm/_logs/2020-07-26T14_18_16_130Z-debug.log
Alexanders-MacBook-Air:~ alexander$
Require admin right to install ionic
sudo npm install ionic
Install latest version of ionic(version 5):
sudo npm install -g #ionic/cli
EACCES: permission denied
you need the root permission
$ su npm install -g ionic

I am facing problem in running my first ionic project

I am using mac
I tried to run my first ionic project , But I am facing erroe in running it in my mac
I am putting all the steps that I have followed into Terminal -
Started with - : $ ionic start MyIonicProject tutorial
$cd MyIonicProject
$ionic serve
then I am getting error
Error: EACCES: permission denied, open '/Users/user/.ionic/helper.log'
> ionic-app-scripts serve --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser
[INFO] Looks like #ionic/app-scripts isn't installed in this project.
This package is required for this command to work properly.
? Install #ionic/app-scripts? Yes
> npm i -D -E #ionic/app-scripts
npm WARN deprecated hoek#2.16.3: The major version is no longer supported. Please update to 4.x or newer
npm WARN checkPermissions Missing write access to /Users/user/Projects/MyIonicProject/node_modules
npm WARN checkPermissions Missing write access to /Users/user/Projects/MyIonicProject/node_modules/#ionic
npm ERR! path /Users/user/Projects/MyIonicProject/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/Users/user/Projects/MyIonicProject/node_modules'
npm ERR! { Error: EACCES: permission denied, access '/Users/user/Projects/MyIonicProject/node_modules'
npm ERR! stack: 'Error: EACCES: permission denied, access \'/Users/user/Projects/MyIonicProject/node_modules\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/Users/user/Projects/MyIonicProject/node_modules' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2018-09-21T06_24_56_379Z-debug.log
users-MacBook-Pro-3:MyIonicProject user$
Try running command by appending sudo as follows:
sudo ionic serve
Or
run below command in the terminal window:
sudo chown -R $USER /usr/local/
This will change the permissions of every thing inside the local folder and then try below command:
sudo ionic serve
Looks like #ionic/app-scripts isn't installed in this project.
So try first this :
npm install #ionic/app-scripts#latest --save-dev
Then:
npm install
and
ionic serve -l

Cannot install Ionic on macOS 10.12.3

I have had considerable trouble trying to install Ionic on my Mac. I have tried every suggestion posted on the web without success. I have tried installing as root, using sudo, you name it.
Using Homebrew I have successfully installed node : v6.10.0 and npm v4.1.2.
Issuing: "npm install -g cordova ionic"
Results in:
npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "cordova" "ionic"
npm ERR! node v6.10.0
npm ERR! npm v4.1.2
npm ERR! path /Users/craigmaxey/.npm
npm ERR! code EPERM
npm ERR! errno -1
npm ERR! syscall mkdir
npm ERR! Error: EPERM: operation not permitted, mkdir '/Users/craigmaxey/.npm'
npm ERR! at Error (native)
npm ERR! { Error: EPERM: operation not permitted, mkdir '/Users/craigmaxey/.npm'
npm ERR! at Error (native)
npm ERR! errno: -1,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/Users/craigmaxey/.npm' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "cordova" "ionic"
npm ERR! node v6.10.0
npm ERR! npm v4.1.2
npm ERR! path npm-debug.log.3262676290
npm ERR! code EPERM
npm ERR! errno -1
npm ERR! syscall open
npm ERR! Error: EPERM: operation not permitted, open 'npm-debug.log.3262676290'
npm ERR! at Error (native)
npm ERR! { Error: EPERM: operation not permitted, open 'npm-debug.log.3262676290'
npm ERR! at Error (native)
npm ERR! errno: -1,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'open',
npm ERR! path: 'npm-debug.log.3262676290' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/craigmaxey/npm-debug.log
This:
EPERM: operation not permitted, mkdir '/Users/craigmaxey/.npm'
indicates that you're missing write privileges on /Users/craigmaxey/.npm. Usually, you can fix this by running npm with sudo:
sudo npm install -g cordova ionic
If this doesn't work for you (since you mentioned you already tried sudo), please add the exact error message you get from running this exact command.
I too was getting the same errors and was able to get it to install following these steps:
Using Finder, manually create a folder called "#ionic" at this location: /usr/local/lib/node_modules/#ionic
Using finder, if "ionic" folder exists at /usr/local/bin/ionic, delete it
run sudo npm install -g #ionic/cli

Can not create ionic 2 app

I am following the ionic installation guide, but when I want to create app it give me error.
The command I enter is:
ionic start cutePuppyPics --v2
The error it gives is:
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\Nodist\\v\\nodev7.0.0\\node.exe" "C:\\Program Files (x86)\\Nodist\\bin\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v7.0.0
npm ERR! npm v3.10.6
npm ERR! code ELIFECYCLE
npm ERR! node-sass#3.9.3 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#3.9.3 postinstall script 'node scripts/build.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-sass
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! E:\nodeProjects\ionic\cutePuppyPics\npm-debug.log
Error with start undefined
Error Initializing app: There was an error with the spawned command: npminstall
There was an error with the spawned command: npminstall
Caught exception:
undefined
Mind letting us know? https://github.com/driftyco/ionic-cli/issues
Node v7.0.0 causes this problem. Instead of nodejs v7.0.0 use nodejs v6.9.1 or install LTS version of node from https://nodejs.org/en/download
You don't have to use --v2 when creating your project. Just type
ionic start cutePuppyPics blank
--v2 is not working with latest ionic. you can use
ionic start cutePuppyPics ionic-angular (for ionic 2.x)
ionic start cutePuppyPics ionic1 (ionic 1.x)

Ionic is not recognized as an internal or external command

how to resolve can i fixed it . i already install cordova and ionic global
C:\Users\sever>npm install -g ionic
npm ERR! not a package C:\Users\sever\ionic
npm ERR! addLocal Could not install C:\Users\sever\ionic
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\sever\node_modu
les\npm\bin\npm-cli.js" "install" "-g" "ionic"
npm ERR! node v5.1.1
npm ERR! npm v3.9.3
npm ERR! path C:\Users\sever\AppData\Local\Temp\npm-5068-24aad619\unpack-77f32b4
3\package.json
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\sever\AppData\
Local\Temp\npm-5068-24aad619\unpack-77f32b43\package.json'
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\sever\AppData\
Local\Temp\npm-5068-24aad619\unpack-77f32b43\package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\sever\npm-debug.log
you just have to run
npm install -g cordova
and
npm install -g ionic
And then in windows you have to reopen the cmd window, else the changes aren't noticed.
My problem is npm -v is 3.10.8, which is lower than 4, causing me npm install -g ionic cordova always fail. Giving error like below.
'ionic' is not recognized as an internal or external command, ...
After I run npm install -g npm everything seem fine, and now I can run npm install -g ionic cordova