0

UPDATE: I found out that the index.html is linking the files incorrectly like it doesn't recognize where the files are stored. I corrected the css link tag in the header of my bundled document but Now I am getting errors with JavaScript still and I cannot see how to fix them because its a very large map.

Whenever I use react-scripts to build out my CRA Application and run the document I get

error messages

I am almost 95% sure this is because of react-bootstrap. Just wondering if anyone else is having these issues and if there is a fix?

Here are my dependencies

{
  "name": "test-app",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^4.2.4",
    "@testing-library/react": "^9.3.2",
    "@testing-library/user-event": "^7.1.2",
    "bootstrap": "^4.4.1",
    "gh-pages": "^2.2.0",
    "react": "^16.13.1",
    "react-bootstrap": "^1.0.0",
    "react-dom": "^16.13.1",
    "react-router-dom": "^5.1.2",
    "react-scripts": "3.4.1",
    "reactstrap": "^8.4.1"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "deploy": "gh-pages -d build"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}

Marco Chavez
  • 209
  • 1
  • 11

1 Answers1

0

Found the answer here:

https://github.com/parcel-bundler/parcel/issues/470#issuecomment-354734896

It turns out you need to specify in your build command with Parcel that there should not be a / in front of the referenced files.

In case that link becomes deleted this what I am referencing:

Sorry i forgot a dot try parcel build index.html --public-url ./ this is also documented on the doc site: https://parceljs.org/production.html

Marco Chavez
  • 209
  • 1
  • 11