{"id":1961,"date":"2017-04-26T08:21:17","date_gmt":"2017-04-26T08:21:17","guid":{"rendered":"http:\/\/salientsoft.co.uk\/?p=1961"},"modified":"2018-10-10T17:15:57","modified_gmt":"2018-10-10T17:15:57","slug":"ionic-2-super-starter-template-application-cannot-find-module-ionic-native","status":"publish","type":"post","link":"https:\/\/salientsoft.co.uk\/?p=1961","title":{"rendered":"Ionic 2 Super Starter template application &#8211; Cannot find module &quot;ionic-native&quot;"},"content":{"rendered":"<p><strong><em>This template is noteworthy<\/em><\/strong> as it contains a number of simple ready made use cases\/patterns such as swipe gesture support, master\/detail pages, searching, and simple entry forms.<br \/>\nAs per <a href=\"http:\/\/salientsoft.co.uk\/?p=1958\">this post<\/a>, a tutorial starter app with the above template should be created as follows:-<\/p>\n<blockquote><p><code>ionic start my-super-starter-app super \u2013v2<br \/>\nnpm install<\/code><\/p><\/blockquote>\n<p>When I tried to run this I got the following error trace:-<\/p>\n<blockquote><p><code>Runtime Error<\/p>\n<p>Cannot find module \"ionic-native\"<\/p>\n<p>Stack<\/p>\n<p>Error: Cannot find module \"ionic-native\"<br \/>\nat g (<a href=\"http:\/\/localhost:8100\/build\/polyfills.js:3:7133\">http:\/\/localhost:8100\/build\/polyfills.js:3:7133<\/a>)<br \/>\nat Object.&lt;anonymous&gt; (<a href=\"http:\/\/localhost:8100\/build\/main.js:108352:7\">http:\/\/localhost:8100\/build\/main.js:108352:7<\/a>)<br \/>\nat __webpack_require__ (<a href=\"http:\/\/localhost:8100\/build\/main.js:20:30\">http:\/\/localhost:8100\/build\/main.js:20:30<\/a>)<br \/>\nat Object.&lt;anonymous&gt; (<a href=\"http:\/\/localhost:8100\/build\/main.js:82204:73\">http:\/\/localhost:8100\/build\/main.js:82204:73<\/a>)<br \/>\nat __webpack_require__ (<a href=\"http:\/\/localhost:8100\/build\/main.js:20:30\">http:\/\/localhost:8100\/build\/main.js:20:30<\/a>)<br \/>\nat Object.&lt;anonymous&gt; (<a href=\"http:\/\/localhost:8100\/build\/main.js:120594:70\">http:\/\/localhost:8100\/build\/main.js:120594:70<\/a>)<br \/>\nat __webpack_require__ (<a href=\"http:\/\/localhost:8100\/build\/main.js:20:30\">http:\/\/localhost:8100\/build\/main.js:20:30<\/a>)<br \/>\nat http:\/\/localhost:8100\/build\/main.js:66:18 at http:\/\/localhost:8100\/build\/main.js:69:10<\/p>\n<p>Ionic Framework: 3.0.1<br \/>\nIonic Native: ^3.5.0<br \/>\nIonic App Scripts: 1.3.0<br \/>\nAngular Core: 4.0.0<br \/>\nAngular Compiler CLI: 4.0.0<br \/>\nNode: 7.5.0<br \/>\nOS Platform: Windows 7<br \/>\nNavigator Platform: Win3<br \/>\nUser Agent: Mozilla\/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/57.0.2987.133 Safari\/537.36<\/code><\/p><\/blockquote>\n<p><a href=\"https:\/\/forum.ionicframework.com\/t\/super-starter-project\/83887\">This Ionic forum post<\/a> documents the problem, which appears to be because the starter template expects A version of ionic-native lower than 3 (mine was 3.5.0 as above). As per the post, I tried the following:-<\/p>\n<ol>\n<li>Edited my package.json and changed the ionic-native version to 2.9.0<\/li>\n<li>Entered <em>npm install ionic-native &#8211;save<\/em><\/li>\n<\/ol>\n<p>This did not work, it failed with a similar error.<\/p>\n<p>Fortunately the post links to an updated template as the solution, in github <a href=\"https:\/\/github.com\/mrweiland\/Ionic-Super-Starter-Ionic-Native-Fix\/tree\/master\">here<\/a>.<\/p>\n<p>This can be cloned and used instead of entering <em>ionic start my-super-starter-app super \u2013v2<\/em><\/p>\n<p>I tried the fixed version and it worked correctly. Note ref the comments in the various posts that it was <strong>not<\/strong> necessary to install ionic-native explicitly via <em>npm install ionic-native &#8211;save<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This template is noteworthy as it contains a number of simple ready made use cases\/patterns such as swipe gesture support, master\/detail pages, searching, and simple entry forms. As per this post, a tutorial starter app with the above template should be created as follows:- ionic start my-super-starter-app super \u2013v2 npm install When I tried to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[200],"tags":[13,16,15],"_links":{"self":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1961"}],"collection":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1961"}],"version-history":[{"count":11,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1961\/revisions"}],"predecessor-version":[{"id":1974,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1961\/revisions\/1974"}],"wp:attachment":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1961"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1961"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1961"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}