Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

[RC1] Templates in external .html file not found #167

Closed
jgw96 opened this issue Oct 14, 2016 · 11 comments
Closed

[RC1] Templates in external .html file not found #167

jgw96 opened this issue Oct 14, 2016 · 11 comments
Assignees

Comments

@jgw96
Copy link
Contributor

jgw96 commented Oct 14, 2016

From @basvdijk on October 14, 2016 14:8

Short description of the problem:

The template files are searched in the wrong path (src/src instead of src):
ionic-app/src/src/pages/Settings/Settings.html

What behavior are you expecting?

The templates being searched in:
ionic-app/src/pages/Settings/Settings.html

My component:

@Component({
    templateUrl: 'Settings.html'
})

export class Settings {

I've also tried ./Settings.html

My package.json:

  "dependencies": {
    "@angular/common": "^2.0.0",
    "@angular/compiler": "^2.0.0",
    "@angular/compiler-cli": "^0.6.2",
    "@angular/core": "^2.0.0",
    "@angular/forms": "^2.0.0",
    "@angular/http": "^2.0.0",
    "@angular/platform-browser": "^2.0.0",
    "@angular/platform-browser-dynamic": "^2.0.0",
    "@angular/platform-server": "^2.0.0",
    "ionic-angular": "^2.0.0-rc.1",
    "ionicons" : "^3.0.0",
    "@ionic/storage": "^1.0.3",
    "ionic-native": "^2.0.3",
    "rxjs": "^5.0.0-beta.12",
    "zone.js": "^0.6.21",


    "ng2-cordova-oauth": "^0.0.6",
    "ng2-translate": "^3.0.0",
    "angular2-google-maps": "^0.15.0",
    "angular2-moment": "^1.0.0-beta.1",
    "font-awesome": "^4.6.3"
  },
  "devDependencies": {
    "@ionic/app-scripts": "^0.0.33",
    "typescript": "^2.0.3"
  },

Which Ionic Version? 2.x

Run ionic info from terminal/cmd prompt: (paste output below)

Your system information:

Cordova CLI: 6.3.1
Ionic Framework Version: 2.0.0-rc.1
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Mac OS X El Capitan
Node Version: v6.7.0
Xcode version: Xcode 8.0 Build version 8A218a

Copied from original issue: ionic-team/ionic-framework#8708

@danbucholtz
Copy link
Contributor

This is fixed is master now.

Will let you know when to test @basvdijk.

Thanks,
Dan

@basvdijk
Copy link

@danbucholtz thanks, appreciated. Any thoughts on when this will be released?

@danbucholtz
Copy link
Contributor

Not sure. Can you test it for me quick? I'm waiting for more feedback. See instructions here.

Should take 30 seconds to implement change to test.

Thanks,
Dan

@basvdijk
Copy link

@danbucholtz commented the suggested line and error got away 👍

@danbucholtz
Copy link
Contributor

@basvdijk,

w00t! I now have three positive tests. Expect to see that fix land today.

Thanks,
Dan

@ezekjh
Copy link

ezekjh commented Oct 14, 2016

Hi,
Having this issue with --dev build only.
Commenting out the mentioned line in transpile.js gets rid of the errors about not finding the templates, but main.js and main.css files are not created.
Prod build compiles fine and the app runs.

@danbucholtz
Copy link
Contributor

We released a new CLI and a new app-scripts

npm install -g ionic@latest
npm install @ionic/app-scripts

I'll re-open if needed. Closing for now.

Thanks,
Dan

@ezekjh
Copy link

ezekjh commented Oct 17, 2016

I'm still having this issue with dev build.

[11:03:28] Error reading template file, "csi-code-list.component.html": Error: ENOENT: no such file or directory, open 'C:\xxxxxxx\src\src\app\inspections\item-detail\component\csi-code-list.component.html'

Here's the output of ionic info:
Cordova CLI: 6.3.1
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-rc.1
Ionic CLI Version: 2.1.1
Ionic App Lib Version: 2.1.1
Ionic App Scripts Version: 0.0.31
OS: Windows 8.1
Node Version: v6.3.1

@danbucholtz
Copy link
Contributor

@ezekjh,

Can you install the latest app-scripts?

npm install @ionic/app-scripts@latest

Thanks,
Dan

@sdsanders
Copy link

Updating to the newest app-scripts fixed this for me.

@ezekjh
Copy link

ezekjh commented Oct 17, 2016

Hi @danbucholtz, sorry about that.. First time I did a npm install of latest but didn't update at all.. Had to change some dependencies on node_modules.
Now it's working fine.
Thank you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants