JavaScript Failed to load resource from bower_components even with correct file path failed load resource,failed load resource dll teamviewer,failed to

I'm running into some frustrating 404 errors while working on a web project. I'm using this file structure for my CSS and JS files:

bower_components
    bootstrap
        |dist
            |css
               | bootstrap.min.css
    angular
        |angular.min.js
    jquery
        |dist
            |jquery.min.js
dist
lib
    |farbtastic.js
node_modules
src
    |img
    |styles
    |scripts
    |view1
    |view2
    |index.html //running browserSync from this folder using this file as index

When I try to reference files in index.html using the appropriate syntax:

<link rel="stylesheet" type="text/css" target='_blank' href="../bower_components/bootstrap/dist/css/bootstrap.min.css">

I get a 404 "Failed to load resource" error.

The ../ syntax appears to be correct, and my console shows that it's looking in the correct location in http://localhost:3000/bower_components/bootstrap/dist/css/bootstrap.min.css.

Is there something I'm not doing correctly?

Answer:1

The root directory of your application is the "src" folder. When you request bootstrap.min.css from "../bower_components/", you are telling the browser to go 1 level up. Because you are already at the root of the application, "../bower_component" is essentially doing the same as "bower_component".

You can:

1. move your index.html 1 level up
2. move your bower_components inside src
3. have some kind of build(gulp/grunt) to reorganize them in a way where the bower_components is within the root folder.
Answer:2

I am using TypeScript almost entire of my client project. Currently I am facing a technical problem. In my HTML, I have an anchor tag like below : <a class="btn btn-default mrm" ui-sref="...

I am using TypeScript almost entire of my client project. Currently I am facing a technical problem. In my HTML, I have an anchor tag like below : <a class="btn btn-default mrm" ui-sref="...

  1. typescript build error visual studio
  2. typescript build error
  3. typescript ignore build error
  4. ionic build typescript error
  5. typescript fail build on error
  6. visual studio 2017 typescript build error

I want to get span value inside flike div, when i click on 'A' tag. In my script, I get 'null' value. Where is my fault? Thank you. my html code: <div class="bottom"><div class="like"> ...

I want to get span value inside flike div, when i click on 'A' tag. In my script, I get 'null' value. Where is my fault? Thank you. my html code: <div class="bottom"><div class="like"> ...

  1. return spanish
  2. return spanx
  3. return spanish translation
  4. return spanish to english
  5. return spanish conjugation
  6. return spanish verb
  7. return span t
  8. return spanish meaning
  9. return in spanish
  10. spanx return policy
  11. spanx return status
  12. spanx return tracking
  13. spanx return label
  14. spanx return address
  15. spanx return policy usa
  16. spanx return policy in store
  17. spanish return ticket
  18. spanx return
  19. spanx return shipping
  20. spanx return canada

I have several elements within a website that are linked to separate php posts. The site also has one popup div('it's a custom modal window'). The popup div has two sections, title and content. When ...

I have several elements within a website that are linked to separate php posts. The site also has one popup div('it's a custom modal window'). The popup div has two sections, title and content. When ...

  1. wordpress post content popup
  2. show post content in popup wordpress

Why sum is undefined. What am I doing wrong? var testData1 = [{ "name": "Doctors", "category": "Doctors", "subCategory": [{ "name": "Likes", "category": "Likes", "...

Why sum is undefined. What am I doing wrong? var testData1 = [{ "name": "Doctors", "category": "Doctors", "subCategory": [{ "name": "Likes", "category": "Likes", "...

  1. recursive function returning none
  2. recursive function returning undefined
  3. recursive function returning value
  4. recursive function returning
  5. recursive function returning either
  6. recursive function output questions
  7. recursive function not returning value
  8. recursive function not returning value python
  9. javascript recursive function returning undefined
  10. recursive function not returning value php
  11. function recursive output
  12. javascript recursive function not returning
  13. recursive function returning array