Comments (26)
We have tried reproducing the issue and it does not occur. Note that you should upgrade Ionic to the latest. Your Typescript has to be the latest.
Do the following:
npm update -g ionic
npm update -g typescript
We would also recommend updating cordova:
npm update -g cordova
Our environment:
kornatzkys-MacBook-Pro:myApp kornatzky$ ionic --version
2.1.0
kornatzkys-MacBook-Pro:myApp kornatzky$ node --version
v6.7.0
kornatzkys-MacBook-Pro:myApp kornatzky$ npm --version
3.10.8
kornatzkys-MacBook-Pro:myApp kornatzky$ cordova --version
6.3.1
kornatzkys-MacBook-Pro:myApp kornatzky$ tsc --version
Version 2.0.3
from backand-ionic2-starter.
The issue still persists. I updated everything and now have the same versions installed as you do.
Still build fails.
Main error IMO is this
[11:15:47] lint finished in 1.08 s
[11:15:56] ngc: Error: Error at /Users/floriannorbertbepunkt/Dropbox/Dropbox Arbeit/Mister Bishop Studios/Ionic Tests/myApp/.tmp/providers/backandService.ts:72:21: Cannot find namespace 'SocketIOClient'.
from backand-ionic2-starter.
If anyone else has this issue please change backandServce.ts line 72
from private socket: SocketIOClient.Socket;;
to private socket: any;
not sure where the error lies though… have installed typings for socket.io, but maybe the wrong ones. or the type def in backendService.ts is wrong.
from backand-ionic2-starter.
Try doing inside the project folder:
npm install @types/node --save-dev --save-exact
npm install @types/socket.io-client --save-dev --save-exact
from backand-ionic2-starter.
Would appreciate your feedback. This should let you preserve your code without any change.
from backand-ionic2-starter.
Thank you. This did the trick. Can you explain me briefly what happened?
As far as I understand, -exact foreced npm to install an exact typings version for socket.io? So before I had the wrong typings (?)
from backand-ionic2-starter.
This is really weird. When I first constructed an example app, I also needed to do it. Later when we converted it to a starter and tried to produce an app from a starter, this was not needed. But in any case, given your issues, I would add it to the README. Thanks for the help.
from backand-ionic2-starter.
@kornatzky @florianbepunkt i have the same error when i run ionic run android, i did exactly what you wrote and i still have the error
10:09:47] ngc failed: NGC encountered an error
[10:09:47] Error: NGC encountered an error
at ChildProcess. (C:\Users\Adir\MyApps\tasklist\node_modules@ionic\app-scripts\dist\ngc.js:62:24)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at ChildProcess.cp.emit (C:\Users\Adir\MyApps\tasklist\node_modules\cross-spawn\lib\enoent.js:40:29)
at maybeClose (internal/child_process.js:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)Error running ionic app script "build": Error: NGC encountered an error
npm
ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\Adir\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "build"
npm
ERR! node v6.7.0
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! ionic-hello-world@ build:ionic-app-scripts build --rollup ./config/rollup.config.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-hello-world@ build script 'ionic-app-scripts build --rollup ./config/rollup.config.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
from backand-ionic2-starter.
Can you post full console ouput and full npm log file?
from backand-ionic2-starter.
C:\Users\Adir\MyApps\tasklist>ionic run andorid
Running 'run:before' npm script before run
ionic-hello-world@ build C:\Users\Adir\MyApps\tasklist
ionic-app-scripts build --rollup ./config/rollup.config.js
[10:09:35] ionic-app-scripts 0.0.30
[10:09:35] build prod started ...
[10:09:35] clean started ...
[10:09:35] clean finished in 38 ms
[10:09:35] copy started ...
[10:09:35] ngc started ...
[10:09:35] lint started ...
[10:09:35] copy finished in 152 ms
[10:09:36] lint finished in 988 ms
[10:09:47] ngc: Error: Error at C:/Users/Adir/MyApps/tasklist/.tmp/pages/login/login.ngfactory.ts:681:41: Property 'usersList' is private and only accessible within class 'LoginPage'.
at check (C:\Users\Adir\MyApps\tasklist\node_modules@angular\tsc-wrapped\src\tsc.js:31:15)
at Tsc.typeCheck (C:\Users\Adir\MyApps\tasklist\node_modules@angular\tsc-wrapped\src\tsc.js:86:9)
at C:\Users\Adir\MyApps\tasklist\node_modules@angular\tsc-wrapped\src\main.js:33:23
at process._tickCallback (internal/process/next_tick.js:103:7)
at Module.runMain (module.js:592:11)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3[10:09:47] ngc: Compilation failed
[10:09:47] ngc failed: NGC encountered an error
[10:09:47] Error: NGC encountered an error
at ChildProcess. (C:\Users\Adir\MyApps\tasklist\node_modules@ionic\app-scripts\dist\ngc.js:62:24)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at ChildProcess.cp.emit (C:\Users\Adir\MyApps\tasklist\node_modules\cross-spawn\lib\enoent.js:40:29)
at maybeClose (internal/child_process.js:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)Error running ionic app script "build": Error: NGC encountered an error
npm
ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\Adir\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "build"
npm
ERR! node v6.7.0
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! ionic-hello-world@ build:ionic-app-scripts build --rollup ./config/rollup.config.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-hello-world@ build script 'ionic-app-scripts build --rollup ./config/rollup.config.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ionic-hello-world package,
npm
ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts build --rollup ./config/rollup.config.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ionic-hello-world
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ionic-hello-world
npm ERR! There is likely additional logging output above.npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Adir\MyApps\tasklist\npm-debug.logCaught exception:
undefinedMind letting us know? https://github.com/driftyco/ionic-cli/issues
C:\Users\Adir\MyApps\tasklist>
from backand-ionic2-starter.
This is not the same issue AFAIK. I had a compiling error with an unmodified clone of this repo. Please follow steps on the readme of this starter and check if error stills persists. If it doesn't, problem is with your code.
This line should give you direction
[10:09:47] ngc: Error: Error at C:/Users/Adir/MyApps/tasklist/.tmp/pages/login/login.ngfactory.ts:681:41: Property 'usersList' is private and only accessible within class 'LoginPage'.
Try set usersList
not to private… and I'm not sure why you have this /.tmp/ in your path. But maybe you better post this on SO, if this is not an issue with the starter itself.
from backand-ionic2-starter.
thank you, i changed the property to public and now i get this error
C:\Users\Adir\MyApps\tasklist>ionic run android
Running 'run:before' npm script before run
> ionic-hello-world@ build C:\Users\Adir\MyApps\tasklist
> ionic-app-scripts build --rollup ./config/rollup.config.js
[10:28:14] ionic-app-scripts 0.0.30
[10:28:14] build prod started ...
[10:28:14] clean started ...
[10:28:14] clean finished in 31 ms
[10:28:14] copy started ...
[10:28:14] ngc started ...
[10:28:14] lint started ...
[10:28:15] copy finished in 213 ms
[10:28:15] lint finished in 921 ms
[10:28:35] ngc finished in 20.31 s
[10:28:35] bundle prod started ...
[10:28:35] bundle prod failed: Could not resolve entry (/app/main.prod.ts)
[10:28:35] Error: Could not resolve entry (/app/main.prod.ts)
at C:\Users\Adir\MyApps\tasklist\node_modules\rollup\dist\rollup.js:8635:28
at process._tickCallback (internal/process/next_tick.js:103:7)
Error running ionic app script "build": Error: Could not resolve entry (/app/main.prod.ts)
npm
ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Adir\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v6.7.0
npm ERR! npm v3.10.8
npm
ERR! code ELIFECYCLE
npm ERR! ionic-hello-world@ build: `ionic-app-scripts build --rollup ./config/rollup.config.js`
npm ERR! Exit status 1
npm
ERR!
npm ERR! Failed at the ionic-hello-world@ build script 'ionic-app-scripts build --rollup ./config/rollup.config.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ionic-hello-world package,
npm ERR!
not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts build --rollup ./config/rollup.config.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ionic-hello-world
npm ERR! Or if that isn't available, you can get their info via:
npm
ERR! npm owner ls ionic-hello-world
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Adir\MyApps\tasklist\npm-debug.log
Caught exception:
undefined
Mind letting us know? https://github.com/driftyco/ionic-cli/issues
C:\Users\Adir\MyApps\tasklist>
from backand-ionic2-starter.
If the Ionic CLI cannot find /app/main.prod.ts
, it means it was not build. This implies there was a compilation error. Since you are not getting any syntax error above it, I would suggest starting with
`ionic serve' and see what errors you get and post them here
from backand-ionic2-starter.
@kornatzky thank you for you time,
i have not errors while i run ionic serve but i can see the page only in explorer browser, in chrome- not
you can see
i run ionic info i get is
Your system information:
Cordova CLI: 6.3.1
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
OS:
Node Version: v6.7.0
i add the photo i compare between chrome and explorer
i have the latest version in chrome and it not works, but in explorer it works.
from backand-ionic2-starter.
A trivial advice, you probably already did it. Clear browser history in Chrome and restart Chrome. Are you on Windows 10?
from backand-ionic2-starter.
yes in windows 10
from backand-ionic2-starter.
Are you willing to share your code, just the src and www, without the node modules. I presume you did do much coding yet. Thanks
from backand-ionic2-starter.
yes,
first i just want to tell you the chrome works now after i clear browser history, so thank you.
the issue now is when i run ionic run android
i upload this file here
http://www.filedropper.com/tasklist
)
from backand-ionic2-starter.
Are you using this library for the Firebase import:
https://www.npmjs.com/package/firebase
?
from backand-ionic2-starter.
yes i installed by
$ npm init
$ npm install --save firebase
from backand-ionic2-starter.
@kornatzky did you find any wrong with my code?
from backand-ionic2-starter.
So far discovered the following: In Chrome with ionic serve
and in Android with ionic run android
, we see this error:
Uncaught TypeError: Cannot read property 'navigator' of undefined
This occurs a result of Firebase in firebase/app.js
This prevents the your app from running, showing a blank screen.
Are you sure we are talking about the right dependency?
from backand-ionic2-starter.
@kornatzky yes,
i had this error before but i solved it but changed with this tutorial
http://alexmgrant.github.io/ionic/firebase/rc0/lodash/2016/10/06/ionic-rc0-&-firebase.html
from backand-ionic2-starter.
Following the Firebase tutorial. Will let you know.
from backand-ionic2-starter.
The issue was reproduced on Android. It seems to be due to the Firebase construction of rollup config. The app as generated fresh from the starter was alright on Android. So my conclusion is the instructions for building the app with Firebase cause it to fail. This is something in which unfortunately I cannot help. Suggest you contact Firebase.
The error log that I got is::
kornatzkys-MacBook-Pro:zoari kornatzky$ ionic run android
Running 'run:before' npm script before run
ionic-hello-world@ build /Users/kornatzky/Downloads/zoari
ionic-app-scripts build --rollup ./config/rollup.config.js
[16:48:32] ionic-app-scripts 0.0.30
[16:48:32] build prod started ...
[16:48:32] clean started ...
[16:48:32] clean finished in 32 ms
[16:48:32] copy started ...
[16:48:32] ngc started ...
[16:48:32] lint started ...
[16:48:34] copy finished in 2.46 s
[16:48:41] lint finished in 8.64 s
[16:49:51] ngc finished in 79.38 s
[16:49:51] bundle prod started ...
[16:49:52] bundle prod failed: Could not resolve entry (/app/main.prod.ts)
[16:49:52] Error: Could not resolve entry (/app/main.prod.ts)
at /Users/kornatzky/Downloads/zoari/node_modules/rollup/dist/rollup.js:8635:28
Error running ionic app script "build": Error: Could not resolve entry (/app/main.prod.ts)
npm
ERR! Darwin 16.0.0
npm ERR! argv
"/usr/local/Cellar/node/6.7.0/bin/node" "/usr/local/bin/npm" "run" "build"
npm
ERR! node v6.7.0
npm ERR!
npm v3.10.8
npm ERR!
code ELIFECYCLE
npm ERR! ionic-hello-world@ build: ionic-app-scripts build --rollup ./config/rollup.config.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-hello-world@ build script 'ionic-app-scripts build --rollup ./config/rollup.config.js'.
npm
ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ionic-hello-world package,
npm
ERR! not with npm itself.
npm
ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts build --rollup ./config/rollup.config.js
npm ERR! You can get information on how to open an issue for this project with:
npm
ERR! npm bugs ionic-hello-world
npm ERR! Or if that isn't available, you can get their info via:
npm
ERR! npm owner ls ionic-hello-world
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/kornatzky/Downloads/zoari/npm-debug.log
Caught exception:
undefined
Mind letting us know? https://github.com/driftyco/ionic-cli/issues
kornatzkys-MacBook-Pro:zoari kornatzky$
from backand-ionic2-starter.
@florianbepunkt thank you very much! apperciate your time
from backand-ionic2-starter.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from backand-ionic2-starter.