Just installed a new Windows 10. After installing Ionic, I started a new app, but ionic serve gives me a blank, white screen with these two errors -
failed to load resource: the server responded with status of 404 vendor.js
failed to load resource: the server responded with status of 404 main.js
Tried uninstall and reinstall node and ionic. Same.
Please advise.
Note that the colors are due to the text formatting only. The only red thing is PLUGIN_NOT_INSTALLED which I’m checking right now.
c:\Dev\sam5>ionic serve --verbose
[DEBUG] CLI flags: { interactive: true, confirm: false }
[DEBUG] { cwd: 'c:\\Dev\\sam5', local: true, binPath:
'C:\\Users\\acer\\AppData\\Roaming\\npm\\node_modules\\ionic\\bin\\ionic', libPath:
'c:\\Dev\\sam5\\node_modules\\ionic\\dist\\index.js' }
[DEBUG] Loading local plugin @ionic/cli-plugin-proxy
[DEBUG] Throwing PLUGIN_NOT_INSTALLED for local @ionic/cli-plugin-proxy
[DEBUG] Loading local plugin @ionic/cli-plugin-ionic-angular
[DEBUG] Getting plugin info for ionic
[DEBUG] Checking for latest plugin version of ionic@latest.
[DEBUG] Getting plugin info for @ionic/cli-plugin-ionic-angular
[DEBUG] Checking for latest plugin version of @ionic/cli-plugin-ionic-angular@latest.
[DEBUG] New daemon pid: 8820
[INFO] Starting app-scripts server: --log-level debug --port 8100 --p 8100 --livereload-port 35729 --r 35729 --address
localhost - Ctrl+C to cancel
[18:17:23] watch started ...
[18:17:23] build dev started ...
[18:17:23] clean started ...
[18:17:23] clean finished in 16 ms
[18:17:23] copy started ...
[18:17:23] transpile started ...
[18:17:25] transpile finished in 1.93 s
[18:17:25] preprocess started ...
[18:17:25] deeplinks started ...
[18:17:25] deeplinks finished in less than 1 ms
[18:17:25] preprocess finished in less than 1 ms
[18:17:25] webpack started ...
[18:17:25] copy finished in 2.10 s
[18:17:25] webpack finished in 156 ms
[18:17:25] sass started ...
[18:17:25] sass finished in 156 ms
[18:17:25] postprocess started ...
[18:17:25] postprocess finished in less than 1 ms
[18:17:25] lint started ...
[18:17:25] build dev finished in 2.31 s
[18:17:25] watch ready in 2.36 s
[18:17:25] dev server running: http://localhost:8100/
[INFO] Development server running
Local: http://localhost:8100
[18:17:28] lint finished in 3.21 s
Update: I’ve installed @ionic/cli-plugin-proxy and no longer see the red warning. Still, nothing is being shown except a blank page.
I don’t have those files in www/build. Only these four files exist -
main.css
main.css.map
polyfills.js
sw-toolbox.js
This is the output of ionic start blank blank --verbose -
c:\Dev>ionic start blank blank --verbose
[DEBUG] CLI flags: { interactive: true, confirm: false }
[DEBUG] { cwd: 'c:\\Dev', local: false, binPath:
'C:\\Users\\acer\\AppData\\Roaming\\npm\\node_modules\\ionic\\bin\\ionic', libPath:
'C:\\Users\\acer\\AppData\\Roaming\\npm\\node_modules\\ionic\\dist\\index.js' }
[DEBUG] Loading global plugin @ionic/cli-plugin-proxy
[DEBUG] New daemon pid: 6152
[DEBUG] Getting plugin info for ionic
[DEBUG] Checking for latest plugin version of ionic@latest.
[DEBUG] Getting plugin info for @ionic/cli-plugin-proxy
[DEBUG] Checking for latest plugin version of @ionic/cli-plugin-proxy@latest.
? Would you like to integrate your new app with Cordova to target native iOS and Android? No
[DEBUG] globalDeps=
√ Creating directory .\blank - done!
[INFO] Fetching app base (https://github.com/ionic-team/ionic2-app-base/archive/master.tar.gz)
√ Downloading - done!
[INFO] Fetching starter template blank (https://github.com/ionic-team/ionic2-starter-blank/archive/master.tar.gz)
√ Downloading - done!
√ Updating package.json with app details - done!
√ Creating configuration file ionic.config.json - done!
[INFO] Installing dependencies may take several minutes!
> npm install
√ Running command - done!
[DEBUG] localDeps=ionic,@ionic/cli-plugin-ionic-angular
> npm install --save-dev --save-exact ionic@latest
√ Running command - done!
> npm install --save-dev --save-exact @ionic/cli-plugin-ionic-angular@latest
√ Running command - done!
> npm dedupe
√ Running command - done!
> git init
√ Running command - done!
> git add -A
√ Running command - done!
> git commit -m "Initial commit" --no-gpg-sign
√ Running command - done!
♬ ♫ ♬ ♫ Your Ionic app is ready to go! ♬ ♫ ♬ ♫
Run your app in the browser (great for initial development):
ionic serve
Run on a device or simulator:
ionic cordova run ios
Test and share your app on a device with the Ionic View app:
http://view.ionic.io
Next Steps:
Go to your newly created project: cd .\blank
Now run ionic build in that project. Do these files exist now?
Delete the www folder, run the command again. What now?
Delete again, now ionic serve. What now about the folder content?
(I try to understand if and if, why these files are not generated in the build process as they should…)
ionic build failed. Seems like it’s looking for some files in the root folder. In any case, the expected files are not generated.
c:\Dev\blank>ionic build
Running app-scripts build:
[19:13:59] build dev started ...
[19:13:59] clean started ...
[19:13:59] clean finished in less than 1 ms
[19:13:59] copy started ...
[19:13:59] transpile started ...
[19:14:01] transpile finished in 1.96 s
[19:14:01] preprocess started ...
[19:14:01] deeplinks started ...
[19:14:01] deeplinks finished in 16 ms
[19:14:01] preprocess finished in 16 ms
[19:14:01] webpack started ...
[19:14:01] copy finished in 2.13 s
Error: Entry module not found: Error: Can't resolve 'c:\' in 'c:\Dev\blank'
resolve 'c:\' in 'c:\Dev\blank'
Parsed request is a directory
using description file: c:\Dev\blank\package.json (relative path: .)
after using description file: c:\Dev\blank\package.json (relative path: .)
No description file found
as directory
existing directory
using path: c:\index
No description file found
after using path: c:\index
no extension
c:\index doesn't exist
.js
c:\index.js doesn't exist
.json
c:\index.json doesn't exist
Hi. I had a similar issue, and I solved it. The bug came from having a “!” character in my project path. When I created a new project in a different directory, which didn’t have strange characters in it, everythink started working. I hope it helps some people who will come over the same problem in future
Hello. I was about to go mad with this error eventually I sorted it it because I had the CDN of Ionic in the app.component.html file
I had a blank screen and I could also deploy the app with Android Studio but it was blank.
I had put there the CDN long ago and I had forgotten in there and it started to cause this error after a while. It was super weird as it happened from one day to the other. I just commented the line about the CDN