Skip to content

Script arnft.worker.js is missing when installing just with npm #3

@Zaniyar

Description

@Zaniyar

By setting up a new project for react and installing the package the arnft.worker.js is missing.

GET http://127.0.0.1:5174/js/arnft.worker.js 404 (Not Found)
by copying the file into public/js/ you will get this error:

Uncaught DOMException: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'http://127.0.0.1:5174/js/ARToolkitNFT_simd.js' failed to load.
    at http://127.0.0.1:5174/js/arnft.worker.js:32:3
(anonymous) @ arnft.worker.js:32

The build works. So those files are in the dist of the node modules... but why it can't find them?

By copying them from the node modules dist folder into public/js/ this error happens:

001c8da2:0x5d8b Uncaught RuntimeError: null function or function signature mismatch
    at 001c8da2:0x5d8b
    at 001c8da2:0x3c904
    at 001c8da2:0x5fd0b
    at 001c8da2:0x5985b
    at A.detectNFTMarker (eval at AI (ARToolkitNFT_simd.js:2:679129), <anonymous>:8:10)
    at A.value (ARToolkitNFT_simd.js:2:743486)
    at A.value (ARToolkitNFT_simd.js:2:742712)
    at process (arnft.worker.js:115:18)
    at self.onmessage (arnft.worker.js:58:7)

Instead of webpack I am using vite.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions