Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

How to create custom camera plugin?

$
0
0

Hm that's weird.

Yes sometimes the process is smooth and sometimes you'd run into errors, the software dependencies can be complex.

What I'll do is I'll download and install the starter myself and see if it's still running okay, it's a long time ago since I did that myself. Some (global) dependencies may have changed and broken stuff, e.g. the Ionic CLI (installed globally) is at a way higher version now.

Stuff does break in ways you don't expect.

Also I never tested this out on Windows (which I see you are using). I believe this Ionic stuff (with all of its nodejs/npm dependencies) can be problematic on Windows. Did you hear about "Ionic Box" ? I've heard it's good for setting up a dev environment on Windows.

And did you try to run "ionic serve" with the "-c" command so that it echoes its logging to the console/terminal? Then I think it will diplay some errors that will give you a hint what's going wrong.

Regarding "index.html" and the location of the templates and so on:

The "html" templates are located in subdirectories of "src/js/app", they're not in "www/templates" as the basic starter apps are doing, because I don't like that (only good for simple apps).

The file/directory structure that I'm using is based on best practices recommended by people like John Papa and is better suited to more complex apps. It's all explained in a section of the README, please take a few minutes to read that section because then it will all become clear.

Now regarding the "index.html". First you have to know that for "ionic serve" you need to look under "src", not under "www". This is because it's configured that way in the "ionic.project" file (or it should be, please double-check your ionic.project file).

Then you need to know that initially there is NO index.html file, only an "index-template.html" file. The reason is that there is a gulp process (called "gulp-inject") which will take this index-template.html file, inject all of the script-dependencies into it, and produce an "index.html" out of that.

If this "gulp-inject" process fails (for instance because the NPM module failed to install), then the index.html file will not be created, which would explain your error.

If you use the "-c" argument with "ionic serve" and look at the terminal then I expect that the cause of the error will become evident.


Viewing all articles
Browse latest Browse all 228595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>