I am trying to run Ionic project using ionic serve, but facing Error: ENOENT : no such file or directory, open d:\ionic2app\www\index.html
I have update ionic but still no luck.
Hello, thanks for opening an issue with us. Would you mind telling me what version of the ionic-cli you are using? You can just run ionic --version
to get the version.
Ionic version is 2.1.0
I believe the reason for this is that the build step isn't being run. I'm still getting errors because ionic serve
is looking for a gulpfile
probably this issue happens because of npm version.
ionic requires npm version 3
I updated, uninstalled, and reinstalled
On Wed, Sep 28, 2016 at 3:41 PM comfortme
<
mailto:comfortme [email protected]
wrote:
a, pre, code, a:link, body { word-wrap: break-word !important; }
probably this issue happens because of npm version.
ionic requires npm version 3
—
You are receiving this because you commented.
Reply to this email directly,
https://github.com/driftyco/ionic/issues/8262#issuecomment-250292786
, or
https://github.com/notifications/unsubscribe-auth/ABdfDusJHYANNhX1l2j79cKAVpHeuU1Kks5qutDegaJpZM4KJNO-
.
@junaidahmed93 and @keithmattix what version of nodejs and NPM are you all running? Thanks!
I'm using nvm doing node 6.7.0 and npm 3.10.3
@keithmattix what version of the ionic cli are you using?
Hm, it says 2.0.0-beta.23...I just uninstalled and reinstalled today.
@jgw96 My Node version is 4.5 and npm 3.10.8
@keithmattix can you run npm uninstall -g ionic
and npm install -g ionic
. The beta flag is no longer required (: @junaidahmed93 are you getting this error with a beta.11 app or an RC.0 app?
@jgw96 I am getting this error with RC.0 app.
Same; mine is an rc.0 app
I am getting this error with RC.0 app.
It seems that the files of pages directory, is not compiling for the build folder.
@bergmito are you running Ionic cli version 2.1.0?
Yes, i'm running Ionic cli version 2.1.0.
Solve my problem, changing template url from components.
Before: templateUrl: 'build/pages/configs/configs.html',
Now: templateUrl: 'configs.html',
Ah, I figured out my problem. My old nvm version didn't allow my ionic binary to update
@jgw96 , My problem is solved by updating ionic (nothing changes in version but app is working now strange). Thanks
Tanks for all
@bergmito you can check out our changelog update instructions for all the upgrade instructions. Since it seems like this issue was fixed for everyone I am going to close this issue for now. Thanks!
I am still facing this issue.
I tried multiple times to update ionic but even though my npm list shows ionic version as 2.1.0
my ionic --version command shows beta.25
so even after I updated and created a new project it is still not able to start and getting this same error.
> Terminate batch job (Y/N)? y
> ionic $
> C:\myapps\ionic2-tests\newapp>npm version
> { npm: '3.10.6',
> ares: '1.10.1-DEV',
> http_parser: '2.7.0',
> icu: '57.1',
> modules: '48',
> node: '6.2.1',
> openssl: '1.0.2h',
> uv: '1.9.1',
> v8: '5.0.71.52',
> zlib: '1.2.8' }
@balasivagnanam I think may be you have to do:
npm uninstall -g ionic@beta
(with sudo if you need those permissions)
To get the beta disapear.
Hope this will help you.
@Rafael300890 thannks,
I solved by :
if you get ionic -v even after uninstalling..
run where ionic and find out the location of your installtion.
for me there was a version installed in
C:\>where ionic
C:\Program Files (x86)\nodejs\ionic
C:\Program Files (x86)\nodejs\ionic.cmd
I am not sure how it went there last time. but after manually deleting them, My ionic cli is now updated and my project is able to render in browser.
Thanks a lot
@keithmattix So what did you do with nvm? this may solve for me too as I use nvm.
solved, I also need to uninstall my beta version and reinstall, just done:
npm uninstall -g ionic@beta
npm install -g ionic
"scripts": {
"build": "ionic-app-scripts build",
"watch": "ionic-app-scripts watch",
"serve:before": "watch",
"emulate:before": "build",
"deploy:before": "build",
"build:before": "build",
"run:before": "build" },
ensure that u have the above code in package.json file.......................
There has nothing wrong with the Ionic version, these error cause by the lack of build script in package.json.
I use ionic start myproject tab --v2
and ionic start myproject tutorial --v2
command start two project, i found the package.json file are different.
In tab project, there is no "serve:before": "watch",
script in package.json. there won't build the necessary file before you run ionic serve
so make sure you have below script in your package.json:
"scripts": {
"build": "ionic-app-scripts build",
"watch": "ionic-app-scripts watch",
"serve:before": "watch",
"emulate:before": "build",
"deploy:before": "build",
"build:before": "build",
"run:before": "build"
},
Thank you very much Jack, that fixed my issue. I used ionic start --v2 myApp sidemenu
. I guess the correct package.json
was the one for tutorial
?
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Most helpful comment
There has nothing wrong with the Ionic version, these error cause by the lack of build script in package.json.
I use
ionic start myproject tab --v2
andionic start myproject tutorial --v2
command start two project, i found the package.json file are different.In tab project, there is no
"serve:before": "watch",
script in package.json. there won't build the necessary file before you runionic serve
so make sure you have below script in your package.json: