Trying to start with --v2 --ts throws an error
From @KerryRitter on April 30, 2016 16:31
Here is my command line output:
c:\Workspaces\RevRadio\mobile>ionic start revradio --v2 --ts
Creating Ionic app in folder c:\Workspaces\RevRadio\mobile\revradio based on tabs project
Downloading: https://github.com/driftyco/ionic2-app-base/archive/typescript.zip
[=============================] 100% 0.0s
Downloading: https://github.com/driftyco/ionic2-starter-tabs/archive/typescript.zip
[=============================] 100% 0.0s
Installing npm packages...
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
Running the install without the --ts argument works as expected.
Copied from original issue: driftyco/ionic2-app-base#24
From @mhartington on April 30, 2016 23:58
What's your node version, npm version and ionic cli version
From @KerryRitter on May 1, 2016 13:55
Sorry bout that.
npm -v = 3.3.12 node -v = 5.1.0 ionic-v = 2.0.0-beta.25
From @vg33 on May 17, 2016 6:48
I'm having exactly the same issue, with the following versions:
npm -v = 3.3.12 node -v = 5.4.0 ionic -v = 2.0.0-beta.25
Any suggestions?
After the latest update (or re-install), i'm no longer having this problem. Perhaps it is resolved.
I'm having the issue with Node 5.11. Will try updating to 5.4.
Sorry - ignore my last comment. I did a reinstall of Ionic and I'm not at beta.26. I still have the same issue, unless I use sudo to make the app.
So... maybe I was wrong to use sudo to install ionic? But I had done that before with v1 and had no problem making apps.
I don't quite see how using sudo to install the Ionic CLI would make the apps generated by it not work right unless run with sudo.
I know some folks recommend against using sudo when installing CLI apps globally, but I always thought it was more a suggestion then anything else.
I'm having the same issue with
npm -v = 1.3.10 node -v = v0.10.25 ionic -v = 2.0.0-beta.30
(on Ubuntu 14.04)
I previously had ionic 1.0 installed, but have run this as root: npm uninstall -g ionic ; npm uninstall -g cordova ; npm cache clear ; npm cache clean to clean up before installing the beta
** except in my case I get the same error with --v2 or with both --v2 and --ts (using "blank" or "tabs" base project)
The following all give the same error: ionic start beta2 --v2 ionic start beta2 blank --v2 ionic start betawesome blank --v2 --ts sudo ionic start betawesome blank --v2 --ts
This Works: ionic start dummy (but of course I get a v1 app)
On OSX I resolved this by installing npm as non-root. I followed the steps in the following article: https://johnpapa.net/how-to-use-npm-global-without-sudo-on-osx/
Now it works like a charm.
@104player The beta requires at least node v0.12. Could you please update and try the command again?
Thanks! Good to know... I'm just using the node and npm that Ubuntu 14.04 gives me at the moment.
- for now I am using Docker to get my node 5 as a workaround:
Dockerfile
FROM node:5-onbuild RUN npm install -g ionic@beta
docker build -t ionic-beta .
docker run -t -i -v $HOME/git/ionic/:/ionic/ ionic-beta /bin/bash
then I can run it..
- still have to try a nice way to fix up permissions, for now doing chown -R 1000 . as needed
@104player Usually Ubuntu has old versions of node available within their distribution network. Luckly nodesource hosts new versions. If you would like to update your native os distro instead of using docker you can follow these instructions. https://github.com/nodesource/distributions#installation-instructions
in my case, i was using very old npm (version less that less than 2.0). i made it working by updating the npm to 3.9.5.
The error provided is very general and appears to not be providing enough insight for CLI users. I will work on improving this messaging so that we can get better details.
Usually providing the --verbose flag and provide more insight into the issue that is occuring.
Example: ionic start cutePuppyPics --v2 --verbose
I'm getting the same error on OS X 10.11.5 with npm 3.10.3, node v4.4.7 and ionic 2.0.0-beta.32.
Running ionic start cutePuppyPics --v2 --verbose gives (skipping the beginning as everything seems to be okay there):
[...] Downloading: https://github.com/driftyco/ionic2-app-base/archive/master.zip [=============================] 100% 0.0s Downloading: https://github.com/driftyco/ionic2-starter-tabs/archive/master.zip [=============================] 100% 0.0s Installing npm packages... Running exec command: npminstall npm ERR! Darwin 15.5.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" npm ERR! node v4.4.7 npm ERR! npm v3.10.3 npm ERR! path /Users/hhiptmair/.npm/inquirer/0.11.0 npm ERR! code EACCES
npm ERR! errno -13 npm ERR! syscall mkdir
npm ERR! Error: EACCES: permission denied, mkdir '/Users/hhiptmair/.npm/inquirer/0.11.0' npm ERR! at Error (native) npm ERR! { [Error: EACCES: permission denied, mkdir '/Users/hhiptmair/.npm/inquirer/0.11.0'] npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'mkdir', npm ERR! path: '/Users/hhiptmair/.npm/inquirer/0.11.0', npm ERR! parent: 'ionic-angular' } 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/hhiptmair/Sites/cutePuppyPics/npm-debug.log
Spawn command completed 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
EDIT: sorry, maybe I was a bit too fast before asking here. after removing node and npm and installing it again, it works now
@hhiptmair Looks like you might have installed node as admin. Could you try running the start command with sudo? sudo ionic start cutePuppyPics --v2 --verbose
@jthoms1 yep, you were right. i was able to recreate this issue by installing node as admin and then it worked running ionic with sudo. nevertheless, i think the better solution is to fix the node-installation. for me, this was done by removing node and npm completely and then just using the official installer. thanks for your help!
I am closing this issue. It has been kind of a catch all for npm install issues from ionic start. If you are having issues please try running with the verbose flag.
sudo ionic start cutePuppyPics --v2 --verbose
This should provide more insight into what is happening. In most cases it will report issues with network connectivity or permissions issues. If this is not the case please open an issue with your ionic info output.
Spawn command completed 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
i have this same error You have been opted out of telemetry. To change this, run: cordova telemetry on. 6.3.1
Ionic CLI Version: 2.1.0-beta.3 Ionic App Lib Version: 2.1.0-beta.1 OS: Node Version: v4.6.0
E:\SocialLoginDemo>ionic start HelloWorld12 blank --v2 Creating Ionic app in folder E:\SocialLoginDemo\HelloWorld12 based on blank project Downloading: https://github.com/driftyco/ionic2-app-base/archive/master.zip [=============================] 100% 0.0s Downloading: https://github.com/driftyco/ionic2-starter-blank/archive/master.zip [=============================] 100% 0.0s Installing npm packages... 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
my version information E:\SocialLoginDemo>ionic info
Your system information:
You have been opted out of telemetry. To change this, run: cordova telemetry on. 6.3.1
Ionic CLI Version: 2.1.0 Ionic App Lib Version: 2.1.0-beta.1 OS: Node Version: v4.6.0
Dependency warning - for the CLI to run correctly, it is highly recommended to install/upgrade the following:
Please install your Cordova CLI to version >=4.2.0 npm install -g cordova