Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on the Server Side #7

Open
rajibulanam opened this issue Jan 6, 2023 · 4 comments
Open

Error on the Server Side #7

rajibulanam opened this issue Jan 6, 2023 · 4 comments

Comments

@rajibulanam
Copy link

Hi,
I am using these codes with the package

  "dependencies": {
    "@testing-library/jest-dom": "^5.16.5",
    "@testing-library/react": "^13.4.0",
    "@testing-library/user-event": "^14.4.3",
    "aframe": "^1.4.1",
    "mind-ar": "^1.2.0",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-scripts": "5.0.1",
    "web-vitals": "^3.1.0"
  }

The server side debug is

A-Frame Version: 1.4.1 (Date 2023-01-04, Commit #5183a179)
index.js:96 THREE Version (https://github.com/supermedium/three.js): ^0.147.1
index.js:98 WebVR Polyfill Version: ^0.10.12
mindar-image.prod.js:9 Uncaught ReferenceError: require is not defined
    at mindar-image.prod.js:9:7
    at index.js:17:1
    at index.js:17:1
(anonymous) @ mindar-image.prod.js:9
(anonymous) @ index.js:17
(anonymous) @ index.js:17
DevTools failed to load source map: Could not load content for chrome-extension://pgjjikdiikihdfpoppgaidccahalehjh/webspeed.js.map: Fetch through target failed: Frame not found; Fallback: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME

Please guide me how to solve this issue.

@jotatoledo
Copy link

jotatoledo commented Feb 1, 2023

@hiukim I guess this is realted to the new build system used since 1.2.0?
After updating to 1.2.0 Im seeing the same issue when deploying a react app created with cra - seems like a lot of require() instructions are spreaded in the bundle, which wont break the app during development.

@chirag-aura
Copy link

chirag-aura commented Feb 22, 2023

@jotatoledo @rajibulanam have you Solved This?

@jotatoledo
Copy link

See hiukim/mind-ar-js#343

@hiukim
Copy link
Owner

hiukim commented Mar 6, 2023

I found that this issue existed only when we tried to import the aframe version,

i.e.import 'mind-ar/dist/mindar-image-aframe.prod.js'

It can be resolved by using the script installs.

<script src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/mindar-image-aframe.prod.js"></script>

The repo has been updated demonstrate this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants