Ionic-app-scripts: RC1 - Failed to load resource

Created on 14 Oct 2016  路  14Comments  路  Source: ionic-team/ionic-app-scripts

_From @pufanalexandru on October 14, 2016 10:40_

I've updated to RC1 by modifying my package.json. When I run ionic serve, the result in localhost:8100 is blank page displaying these errors:

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8100/build/main.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8100/build/main.js

It seems that the files are never built, as the www/build directory contains only one file, polyfills.js.

System info:

Cordova CLI: 6.2.0
Gulp version: CLI version 3.9.1
Gulp local:
Ionic Framework Version: 2.0.0-rc.1
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
OS: Windows 7 SP1
Node Version: v6.5.0

_Copied from original issue: driftyco/ionic#8698_

needs_reply

All 14 comments

_From @six006 on October 14, 2016 10:50_

using the latest "@ionic/app-scripts": "^0.0.33"

_From @pufanalexandru on October 14, 2016 10:58_

I've tried it, but unfortunately, it's still not working (same error)

_From @m927259903 on October 14, 2016 11:50_

i have the same problem. even if update ionic-app-scripts to latest version.

_From @pufanalexandru on October 14, 2016 11:59_

Strange enough, if I create a new project and copy the src folder from the old one, it works well.

_From @m927259903 on October 14, 2016 12:25_

:+1:

_From @juliolemesti on October 14, 2016 14:54_

Had the same problem, went back to app-scripts 0.0.30 and it worked.

_From @kabus202 on October 14, 2016 15:6_

@juliolemesti thanks, works after changing it to 0.0.30

_From @patrickmcd on October 14, 2016 15:8_

I was getting the same blank page. And if it helps, after saving a file and kicking off the watch, I'd get this:

ionic $ [10:38:41]  template update started ...
[10:38:41]  bundle update started ...
(node:20102) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Could not resolve './app.module' from /Users/me/Work/test-app/src/app/main.dev.ts

Back to 0.0.30 I go.

I think we have this fixed in master. I'd like to push a release out today. We'll let you know when it's out and available for testing.

Thanks,
Dan

@pufanalexandru would you mind giving this a try with our latest release of app-scripts and the cli? You can see our blog post here to see how to update. Thanks!

I was having this issue and was unable to get any errors as to why main.css and main.js weren't building. After the update I can see the errors. In RC0 I would use index.ts files in some directories so that I could store multiple exports in one file and then just import the directory that has the index.ts file. Apparently that doesn't work in RC1 and thats why my files were not building

Update: I guess that's not entirely true. When exporting interfaces there is no error referencing index like ./myfolder, when exporting constants I have to reference index like ./myfolder/index. Not sure if that means anything but that could have broken multiple peoples projects. Either way your update worked for me.

I'm also have issues with app-scripts 0.0.34 and index files. I get this error:

bundle failed: Could not resolve '../providers' from     

With version 0.0.30 I can do this:

import * as providers from '../providers';

but with 0.0.34 I have to do this:

import { Provider1 } from '../providers/provider1';
import { Provider2 } from '../providers/provider2';
import { Provider3 } from '../providers/provider3';
// and so on

This should be fixed in this commit.

We'll push this out tonight or tomorrow.

Please follow up and let us know if this doesn't resolve the issues.

Thanks,
Dan

Yes, this solves the issue for me, thanks

Was this page helpful?
0 / 5 - 0 ratings