Getting error in building project in using bower, nodejs, grunt - javascript

I have created project using nodejs,
bower packages are installed but not added the tags in index.html, so I have manually inserted the script tags like ../bower_components
so I am getting this error
http://localhost:9000/bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js Failed to load resource: the server responded with a status of 404 (Not Found)
2016-05-24 18:11:04.419 http://localhost:9000/bower_components/angular-ui-router/release/angular-ui-router.js Failed to load resource: the server responded with a status of 404 (Not Found)
2016-05-24 18:11:04.581 angular.js:4587 Uncaught Error: [$injector:modulerr] Failed to instantiate module bulbulPortal20App due to:
Error: [$injector:modulerr] Failed to instantiate module ui.bootstrap due to:
Error: [$injector:nomod] Module 'ui.bootstrap' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
to avoid these errors in future what I have to do?

Related

How to import JavaScript files (fabric.js) in a vaadin Application

I'm working on a Vaadin application which is using spring boot.
I want to use the fabric.js framework, but have not managed to import the files without running into Errors yet.
When trying to use the #JavaScript Annotation, I run into following Error:
[v-server-output] c.v.b.devserver.DevServerOutputTracker : ERROR in ./fabric.min.js
[v-server-output] c.v.b.devserver.DevServerOutputTracker : Module not found: Error: Can't resolve 'jsdom' in 'C:\entwicklung\grw2_new\app-and-run\applications\grw\grw-desktop\frontend'
After trying it with a npm installation(https://vaadin.com/directory/component/niiyeboahfabric-canvas), I ran into a similar Error:
[ERROR] ERROR in ../node_modules/tunnel-agent/index.js
[ERROR] Module not found: Error: Can't resolve 'net' in '/.../node_modules/tunnel-agent'
...
[ERROR] # ../node_modules/jsdom/lib/api.js
[ERROR] # ./fabric.min.js
To avoid the jsdom Error I tried to import the file in a onAttach Method using UI.getCurrent().getPage().addJavaScript("frontend/fabric.min.js");
But Vaadin does not manage to find the specified file, whether I put them in the frontend folder of my project or in META-INF/resources/frontend.

Android resource linking failed when i try to compile

this is a demo app with empty activity it shows the error in the android studio when i compile or build the project . even though when i run that in react-native run-android it shows out the same error please to suggest some tips to trouble shoot this issue.
Android resource linking failed
E:\reactapp\Demo\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:136: error: resource android:color/black not found.
E:\reactapp\Demo\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:138: error: resource android:color/black not found.
E:\reactapp\Demo\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:139: error: resource android:color/black not found.
E:\reactapp\Demo\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:143: error: resource android:color/white not found.
E:\reactapp\Demo\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:150: error: resource android:color/white not found.
E:\reactapp\Demo\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:151: error: resource android:color/black not found.
E:\reactapp\Demo\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:163: error: resource android:color/white not found.
E:\reactapp\Demo\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:164: error: resource android:color/black not found.
E:\reactapp\Demo\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:181: error: resource android:color/black not found.
E:\reactapp\Demo\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:772: error: resource android:color/transparent not found.
E:\reactapp\Demo\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:967: error: resource android:color/transparent not found.
error: failed linking references.

How to use angular-card

I want to use im my angularJS project : https://github.com/gavruk/angular-card/blob/master/src/card.js
but when i do everyhing like showed in documentation i get:
libraries.js:30369 Uncaught Error: [$injector:modulerr] Failed to instantiate module myApp due to:
Error: [$injector:modulerr] Failed to instantiate module myApp.controllers due to:
Error: [$injector:modulerr] Failed to instantiate module angular-card due to:
Error: [$injector:nomod] Module 'angular-card' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.

Jhipster - 404 error on app.js when running in prod profile

I have a problem running my jhipster application in prod. After the deployment of prod war file the site is unable to load due to a 404 not found on /app/app.js
However vendor js and css are correctly injected. Not sure what's causing this issue.
Error message :
Failed to load resource: the server responded with a status of 404 (Not Found)
generated.js:19530
Uncaught TypeError: Cannot read property 'module' of undefined(…)
http://localhost:9080/app/app.js
Failed to load resource: the server responded with a status of 404 (Not Found)
Error as seen in the browser's console:
did you also build your app for prod? it looks like your app did not build the client site. This is done actually wiht the gulp build command. Depending on your build system maven or gradle you can specify the prod environment for the build phase, e.g. for maven mvn -Pprod package.
The gulp build command will be automatically executed durring the build phase. In the doc you can find more information about how to use JHipster in production.

Grunt-Built Production env, angularJS nomod error

I built an angularJS app scaffolded by yeoman, and the test environment with
grunt serve
went just as I expected, but when I tried to build the production environment with
grunt build
and run it with a nodemon, and I got no content except for the header/footer, and my chrome javascript console gave me the following error.
Uncaught Error: [$injector:modulerr] Failed to instantiate module myApp due to:
Error: [$injector:nomod] Module 'myApp' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.3.12/$injector/nomod?p0=myApp
at http://localhost:3000/scripts/vendor.c0d4f7d6.js:3:20442
at http://localhost:3000/scripts/vendor.c0d4f7d6.js:3:28774
at b (http://localhost:3000/scripts/vendor.c0d4f7d6.js:3:28346)
at b (http://localhost:3000/scripts/vendor.c0d4f7d6.js:3:28658)
at http://localhost:3000/scripts/vendor.c0d4f7d6.js:4:5159
at f (http://localhost:3000/scripts/vendor.c0d4f7d6.js:3:20827)
at n (http://localhost:3000/scripts/vendor.c0d4f7d6.js:4:4937)
at Sb (http://localhost:3000/scripts/vendor.c0d4f7d6.js:4:6627)
at h (http://localhost:3000/scripts/vendor.c0d4f7d6.js:3:26459)
at _ (http://localhost:3000/scripts/vendor.c0d4f7d6.js:3:26769)
http://errors.angularjs.org/1.3.12/$injector/modulerr?p0=myApp&p1=E…0(http%3A%2F%2Flocalhost%3A3000%2Fscripts%2Fvendor.c0d4f7d6.js%3A3%3A26769)vendor.c0d4f7d6.js:3 (anonymous function)vendor.c0d4f7d6.js:4 (anonymous function)vendor.c0d4f7d6.js:3 fvendor.c0d4f7d6.js:4 nvendor.c0d4f7d6.js:4 Sbvendor.c0d4f7d6.js:3 hvendor.c0d4f7d6.js:3 _vendor.c0d4f7d6.js:3 $vendor.c0d4f7d6.js:7 (anonymous function)vendor.c0d4f7d6.js:2 _.Callbacks.kvendor.c0d4f7d6.js:2 _.Callbacks.l.fireWithvendor.c0d4f7d6.js:2 _.extend.readyvendor.c0d4f7d6.js:1 g
http://start.jcolemorrison.com/building-an-angular-and-express-app-part-1/
I was basically following this, and when i did npm start i got basically a blank page. Any suggestions?

Categories