hi guys i was working on a app for 2 months, its never been before. today i typed ionic serve and it gave me a blank page. i tried again again again; nothing changed.
the errors of console is like that:
```
Failed to load resource: the server responded with a status of 404 (Not Found)
vendor.js Failed to load resource: the server responded with a status of 404 (Not Found)
main.js Failed to load resource: the server responded with a status of 404 (Not Found)
vendor.js Failed to load resource: the server responded with a status of 404 (Not Found)
main.js Failed to load resource: the server responded with a status of 404 (Not Found)
main.css Failed to load resource: the server responded with a status of 404 (Not Found)
```
then i searched for solution on the internet and tried that:
```
npm uninstall -g cordova ionic
npm install -g cordova ionic
```
but it didnt work!
so i remembered, once i backed up my app folder before. so i tried that and saw it works. i copied that back-up folder's www/build folder files to the my up to date app-folder. and run ionic serve again. it deletes all files automatically and doesnt work?
i cannot serve my app ? please assist me guys. i did nothing to receive that error i am shocked!
terminal:
```
Starting app-scripts server: --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser -
Ctrl+C to cancel
[04:35:39] watch started ...
[04:35:39] build dev started ...
[04:35:39] clean started ...
[04:35:39] clean finished in 7 ms
[04:35:39] copy started ...
[04:35:39] deeplinks started ...
[04:35:39] deeplinks finished in 236 ms
[04:35:39] transpile started ...
[04:35:43] dev server running: http://localhost:8100/
[OK] Development server running!
Local: http://localhost:8100
External: http://192.168.1.3:8100, http://192.168.136.1:8100, http://192.168.80.1:8100
DevApp: DenemeApp#8100 on ASUS
[04:35:44] copy finished in 4.77 s
[04:35:44] watch ready in 4.94 s
```
stops here.
my ionic info:
```
cli packages: (C:\Users\Uğur\AppData\Roaming\npm\node_modules)
#ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
#ionic/app-scripts : 3.0.1
Cordova Platforms : none
Ionic Framework : ionic-angular 3.8.0
System:
Node : v6.11.4
npm : 3.10.10
OS : Windows 8.1
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
```
Try serving your application in port 8102. I don't know how you managed it. But you changed the port where your build is available.
So run the following command :
$ ionic serve --p 8102
I couldnt find the solution, luckily i backed up the project lately. I dont know what i did to main folder but my backup folder working well. I did exact same changes (updated) and its working.
Related
I have an angular 6 application with typescript and webpack.
This angular application has backend for serving api calls and the backend is running as a separate application.
To start the application in my local, From the project home folder,
npm start
To build the application,
npm run build
When I run the above command, I get, dist folder which has the follwoings.
- index.html
- assets
- fonts
- icon
- img
- main.sdgsdgfdsff.css
- main.sdfgsdfgdsfg.js
- manifest.3asdasdfsad.bundle.js
- polyfills.3462436425654af34.bundle.js
- vendor.sdgsdfg3453244354.bundle.js
- webpack-assets.json
- server
- config.js
- index.js
- routes.js
- socket.js
Now, I would like to run this application in a remote server.
So, copied the entire dist folder and tried the following.
forever start -o otput.log server/index.js
The console logs,
warn: --minUptime not set. Defaulting to: 1000ms
warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
info: Forever processing file: server/index.js
In output.log.
Node NOT Exiting...
Nothing is happening.
My goal is to start this in a remote server. Not sure what am i missing here.
I tried forever in my local mac also.
forever start -o otput.log server/index.js
I installed the below stuffs also.
npm install express compression forever minimum-tls-version body-parser fs https path
method-override
i have to run an application from a local repo (called exoplanet-explorer). I installed Node.js and Git, and I followed these steps:
in the command line of Git Bash:
git clone https://github.com/udacity/exoplanet.explorer.git
cd exoplanet-explorer
npm install -g gulp bower
npm install && bower install
gulp serve
When I run gulp serve, the app page opens but it's blank. In the console this list of errors appears:
Failed to load resource: the server responded with a status of 404 (Not Found) webcomponents-lite.js:1
(index):1 Refused to execute script from 'http://localhost:5000/bower_components/webcomponentsjs/webcomponents-lite.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
:5000/bower_components/iron-flex-layout/classes/iron-flex-layout.html:1 Failed to load resource: the server responded with a status of 404 (Not Found)
:5000/bower_components/iron-pages/iron-pages.html:1 Failed to load resource: the server responded with a status of 404 (Not Found)
:5000/bower_components/iron-selector/iron-selector.html:1 Failed to load resource: the server responded with a status of 404 (Not Found)
:5000/bower_components/paper-material/paper-material.html:1 Failed to load resource: the server responded with a status of 404 (Not Found)
:5000/bower_components/paper-menu/paper-menu.html:1 Failed to load resource: the server responded with a status of 404 (Not Found)
:5000/bower_components/paper-scroll-header-panel/paper-scroll-header-panel.html:1 Failed to load resource: the server responded with a status of 404 (Not Found)
:5000/bower_components/paper-styles/paper-styles-classes.html:1 Failed to load resource: the server responded with a status of 404 (Not Found)
:5000/bower_components/paper-toolbar/paper-toolbar.html:1 Failed to load resource: the server responded with a status of 404 (Not Found)
[Deprecation] Styling master document from stylesheets defined in HTML Imports is deprecated, and is planned to be removed in M67, around May 2018. Please refer to for possible migration paths.
page.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
(index):1 Refused to execute script from
'http://localhost:5000/bower_components/page/page.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
:5000/bower_components/polymer/polymer.html:1 Failed to load resource: the server responded with a status of 404 (Not Found)
planet-thumb.html:78 Uncaught ReferenceError: Polymer is not defined
at planet-thumb.html:78
at planet-thumb.html:100
scale-visualizer.html:68 Uncaught ReferenceError: Polymer is not defined
at scale-visualizer.html:68
at scale-visualizer.html:189
What can I do?
I am working on the same project and I had the exact same issues, using Windows 10 Home, git version 2.15.1.windows.2 and node v8.11.3, npm v6.1.0, bower v1.8.4, gulp v3.9.1. I looked to where the bower_components folder is supposed to be located and there is absolutely nothing there. I also opened bash as administrator to install.
screenshot of my errors when I first load the page
screenshot of my errors when I refresh the page
If you are having these errors, bower is NOT installing the polymer-starter-kit properly for whatever reason or you forgot/failed to install it yourself. I actually watched my installs fail, as over and over i would install, type "bower list" and it would tell me the polymer files in the starter kit that I needed, were still not installed - but I just saw the files install.
bower list shows the files still NOT being saved to the project
So I had to do a "bower install -f polymer-starter-kit" after i did this and then installed gulp and typed gulp serve everything worked perfectly. Hope this helps someone else - I just spent over 16 hours yesterday and 5 today trying to figure this out. NOTE: you might want to do a "bower cache clean" first.
bower install -f polymer-starter-kit
Errors resolved!!!
I've a project in NodeJS. I've built a framework based on ExpressJS, SocketIO, MongoDB and it works pretty well in local version.
I'm trying to deploy this project on a DigitalOcean Droplet (Debian) ; I've installed everything required (npm, node, mongo). It starts to launch the daemon and I got a big error.
To launch my app I use npm start with the following scripts
"scripts": {
"start": "./node_modules/.bin/supervisor DEBUG=unicorn ./bin/www"
}
Then it goes like that
Starting child process with 'node ./bin/www'
01:59:19 - info: Try to connect to MongoDB via Mongoose ...
01:59:19 - info: Loading Socket.io module ...
Option log level is not valid. Please refer to the README.
01:59:19 - info: Reboot system initialized (pre_starters)
01:59:19 - info: --------------------
01:59:19 - info: Unicorn (Black Mamba (0.0.4a))
01:59:19 - info: -> Welcome aboard !
01:59:19 - info: -> Your app is ready to use.
01:59:19 - info: --------------------
01:59:19 - info: Express server listening on port 8003
events.js:72
throw er; // Unhandled 'error' event
^
Error: ENOENT, open 'logs/app.log'
Program node ./bin/www exited with code 8
So i'm searching a solution for more than 3 hours now, people say it's usually because the port is busy, I checked all the processes and the port they use, and found nothing.
I also tried to change the port of Express and SocketIO (80, 8080, 3000, etc.) but it didn't change anything ...
Do you have any other idea i could try ? Or better a miraculous solution ? Thanks people ;)
PS : I also did a clean npm install from the server to have no problem with the packages compatibilities from my local version to the server.
The problem is this:
Error: ENOENT, open 'logs/app.log'
It means that your script is trying to open a logfile but fails. Since the error isn't getting caught, the script crashes.
My guess is that it's not being started in the directory you assume (one that has logs/ as a subdirectory). So you should either make sure that your script is started in the right directory, or you should use an absolute path to the logfile.
I've written a node app, which works fine for me locally, but when I try to install it to nodejitsu, I'm given the response:
C:\xampp\htdocs\officeball\node_scripts>jitsu install index_all.js
info: Welcome to Nodejitsu jt0dd1995
info: jitsu v0.13.9, node v0.10.23
info: It worked if it ends with Nodejitsu ok
info: Executing command install index_all.js
error: Sorry, index_all.js is not a node app
error: Error running command install index_all.js
help: For help with this error contact Nodejitsu Support:
help: webchat: <http://webchat.nodejitsu.com/>
help: irc: <irc://chat.freenode.net/#nodejitsu>
help: email: <support#nodejitsu.com>
help:
help: Copy and paste this output to a gist (http://gist.github.com/)
info: Nodejitsu not ok
C:\xampp\htdocs\officeball\node_scripts>
Is there a special way that I need to write a node app for it to work with nodejitsu?
Here's the app
Try to do
jitsu install
if u have a package.jsonfile that should work
I have installed npm, Yeoman and got everything working, the webapp generator works like a charm. I want to get into angular development and therefore tested the generator-angular.
I did everything as stated in the readme file
npm install -g generator-angular
yo angular [app-name]
then
grunt
grunt serve
at grunt i got this error:
WARN [watcher]: Pattern "/home/user/angular/test/mock/*/.js" does not match any file.
INFO [Chrome 31.0.1650 (Linux)]: Connected on socket 3juFgfMcw5Pm88-cve27
Chrome 31.0.1650 (Linux) Controller: MainCtrl should attach a list of awesomeThings to the scope FAILED
Error: [$injector:modulerr] Failed to instantiate module testApp due to:
Error: [$injector:unpr] Unknown provider: $routeProvider
The main error - is with "unknown" $routeProvider.
Check if ngRoute module has been loaded.
Also check that you propely injected it to your testApp module.
It would be great if you could provide your testApp code.
Also I guess that you have an error with regex (no escape symbol)
/home/user/angular/test/mock/**/*.js
Try this "/home/user/angular/test/mock/*\.js"
/home/user/angular/test/mock/**/*\.js