The 'salesforce' starter template isn't being found for Ionic v2


#1

Hi - I want to create a new Ionic 2 app using the ‘salesforce’ template… however, even though it’s listed in the available starter templates list (see below), I get the following error…

C:\Users\john_\ionicproto2>ionic start myApp salesforce
Directory already exists: C:\Users\john_\ionicproto2\myApp
Would you like to overwrite the directory with this new project?
(yes/no): y

Creating an Ionic 2.x app in C:\Users\john_\ionicproto2\myApp based on the salesforce template.

Downloading: https://github.com/driftyco/ionic2-app-base/archive/master.zip
Error with start Error: No starter template named "salesforce"
at Object.Start.fetchIonicStarter (C:\Users\john_\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\lib\start.js:492:13)
at Object.Start.fetchSeed (C:\Users\john_\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\lib\start.js:248:16)
at C:\Users\john_\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\lib\start.js:99:18
at fulfilled (C:\Users\john\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\john_\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\john_\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:749:13)
at C:\Users\john_\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:557:44
at flush (C:\Users\john_\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:108:17)
at combinedTickCallback (internal/process/next_tick.js:73:7)
at process.tickCallback (internal/process/next_tick.js:104:9)
Error Initializing app: Error: No starter template named "salesforce"
Error: No starter template named "salesforce"
at Object.Start.fetchIonicStarter (C:\Users\john
\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\lib\start.js:492:13)
at Object.Start.fetchSeed (C:\Users\john
\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\lib\start.js:248:16)
at C:\Users\john_\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\lib\start.js:99:18
at fulfilled (C:\Users\john\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\john_\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\john_\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:749:13)
at C:\Users\john_\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:557:44
at flush (C:\Users\john_\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)

Here are the details about my environment, which is running on Win10…

C:\Users\john_\ionicproto2>ionic info

Your system information:

ordova CLI: 7.0.0
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.10.2
Xcode version: Not installed

Any info/guidance on this would be great.

Thanks,
John


#2

hi john, it seems you miss all the dependencies on node js needed to start a project. Because at this stage, it’s probably the only cause of error.

To start with, make sure you have the right setup.

With cmd launched in windows in command mode, type:

ionic info

and put the result here.
If you see tons of errors, then your ionic setup is not ok.

You should see something like (

ordova CLI: 6.5.0
Ionic Framework Version: 2.3.0
Ionic CLI Version: 2.2.2
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.1
ios-deploy version: Not instal
ios-sim version: Not installed
OS: Windows 7
Node Version: v6.9.4
Xcode version: Not installed

)

Hope it helps, François


#3

OK for you, delete all folder (\ionicproto2\salesforce), recreate it, then retry to download it from it in Admin mode, it’s possible it’s just because of an Admin issue. (relaunch cmd in admin mode so that it has full rights).


#4

Please do not follow the above advice. There is no reason to run npm with elevated privileges.

This appears to be a bug in Ionic’s CLI. The salesforce template seems to only be available for v1, and it is being falsely advertised as available for current versions.


#5

Thanks for the replies folks.

Francois - I already provided the ionic info, but here it is again:

C:\Users\john_\ionicproto2>ionic info
Your system information:
ordova CLI: 7.0.0
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.10.2
Xcode version: Not installed

Francois, you mentioned a “salesforce” folder (i.e. \ionicproto2\salesforce) but no such folder exists. Anyways, I tried creating a new folder and from within that folder in my Node command line, did an “ionic start myApp salesforce” but got the very same error.

@rapropos - yes, it does seem like the documentation is wrong or misleading as the “salesforce” template is listed… i.e.

ionic start --list

Downloading Starter Templates - http://code.ionicframework.com/content/starter-templates.json
Ionic Starter templates

blank … A blank starter project for Ionic
complex-list … A complex list starter template
maps … An Ionic starter project using Google Maps and a side menu
salesforce … A starter project for Ionic and Salesforce
sidemenu … A starting project for Ionic using a side menu with navigation in the content area
tabs … A starting project for Ionic using a simple tabbed interface

What is the official advice here? I want to create an Ionic hybrid-remote app which talks to our Salesforce… do I have to use a v1-based Ionic app, will the “salesforce” template work for v3? Do I need to use a specific CLI version for v2?

Haven’t used Ionic before and it looks incredibly cool - however, the fact that the documentation is misleading about the functionality being offered is quite frustrating. :expressionless:

Thanks!
John

I tried running


#6

The current Ionic CLI v2 doesn’t really distinguish the starter templates between v1 and v2+ correctly. This will be fixed in Ionic CLI v3 which is currently RC.[quote=“JC1, post:5, topic:89237”]
I want to create an Ionic hybrid-remote app which talks to our Salesforce… do I have to use a v1-based Ionic app,
[/quote]

If there is only a template for v1: Then you have to use v1.[quote=“JC1, post:5, topic:89237”]
will the “salesforce” template work for v3?
[/quote]

Is there a starter template for salesforce and v2+?[quote=“JC1, post:5, topic:89237”]
Do I need to use a specific CLI version for v2?
[/quote]

No.


#7

Thanks for the reply Sujan.

Is there an ETA for CLI v3? Will the ‘salesforce’ starter template work in that version?

Thanks,
J.


#8

CLIv3 has already been released (although I don’t recommend upgrading to it yet). It doesn’t really affect how starter templates work; just which ones it will offer you. No, I do not believe there is a current version of the salesforce starter template.


#9

Thanks for the reply.

Might there be a contact @ Ionic who can provide an official update on the status of ‘salesforce’ starter template support in v3?

In the absence of a working salesforce template, anyone have an article/link on adding salesforce support into an Ionic app which has been created with the ‘blank’ or ‘tabs’ templates?

Thanks!
J.