AngularJS local build works dist build crashes browser - angularjs

I'm afraid I don't have much to show and that's my issue. I have an angular app which works fine locally but crashes the browser when I deploy it. Used angularjs-generator to build it. The browser crashes when attempting to use the dist build. The biggest issue is that the JavaScript console doesn't show any errors before the browser crashes so I'm at a loss on how to debug this? I've confirmed everything is in the dist folder that should be.
If anyone has run into this or has suggestions on how to troubleshoot this, I'd appreciate it.

I think I have an idea. For me the yeoman angular generator crashed when I tried to perform 'grunt test' on so I was thinking that the problem you have was related. For me the reason was that there were some dependencies missing namely :
npm install grunt-karma --save-dev
npm install karma-phantomjs-launcher --save-dev
Hope this works for you

Related

React build not working whereas working fine when I start the server locally

I have a React project which runs fine when I do npm run start. All the elements load completely fine.
But when I create a build using npm run build, the resulting build when run would not load the elements.
In my package.json I have homepage also set like this:
"homepage": ".",
Also, there are no errors in console.
During compile time as well there are no warnings.
Any suggestions on what could I be missing or some steps I must try to find what could be going wrong?
I tried deleting the node_modules, clearing node cache and rebuilding but that too did not help
Thank you!

No projects support the 'serve' target. Stuck and can't run Angular project on my localhost

I've tried to fork an angular project from GitHub, and run it with ng serve. But I get the error "No project support the 'serve' target". I'm really stuck and don't know what to do. I'm new to Angular, does anyone know what to do? My intent would be that of running the project on my localhost so I can see how the code functions. Any help would be appreciated, thank you in advance
Try this
npm install -g angular-cli
then
npm start

mauron85 background-geolocation installation issues (react-native: command not found)

hope you can help. I'm trying to install mauron85 react-native-background-geolocation and when i go to link the dependencies (react-native link react-native-mauron85-background-geolocation) i keep getting 'react-native: command not found'. i've installed npm, nodejs, react native (npm install -g react-native-cli), flow, watchman and the mauron85 package. i'm running this on ubuntu and have tried on mac and getting the same error message on both. I've also tried doing the manual setup for android and this hasn't worked because I don't have some of the node modules it needs, and have tried adding the right path to my path variable, which has made no difference. Is there anything obvious I'm missing that I've forgotten to install/has anyone had a similar message before?
Thanks!

AngularJS1.5 injector issue (MacOSX)

Hey all I'm getting this Error Message when trying to use 'gulp serve-dev' on my codebase (https://github.com/CraigOldfield/AngularJSWork). The steps to reproduce where as follows:
Clone the repo onto my machine (this machine already had node
installed and gulp (globally).
Run npm install and bower install
Run gulp serve-dev form the root directory
Previous command opened a browser and the console is reporting the injector issue, this very same code worked this morning on my work (windows) computer, I am now on my home (Mac) computer.
Im very new to Mac so it could be something related to that, I'm hoping someone can give me some more information to help debug this issue.
For those looking at this question with the same problem, what worked for me is the following comment by Yadejo.
Yadejo's comment "You should keep your versions of angular and angular-animate in sync. Take a look here: stackoverflow.com/a/32768153/3980911"
Once I updated my bower.json file to have the same version for each of these dependancies, I ran 'npm install' and 'bower install' which fixed the issues I described in the question above.

npm script error while trying to install react-router-dom

While working on my react project, I just tried to install react-router-dom and somehow it seems it erased all my scripts and modules. Now I cannot run the server again no matter what I do. I also cleaned working directories and even deleted the branch, but it still doesn't work at all..
and below is the error message when I hit 'npm start'.
Although I don't know why installing react-router-dom removed all my packages, I reinstalled node modules and now it works again. :)

Resources