'Uncaught ReferenceError: d is not defined ...', Error with vue project 'npm run build'
See original GitHub issueDescription of the problem
Tthe latest version of OBJLoader2Parallel
import { OBJLoader2Parallel } from 'three/examples/jsm/loaders/OBJLoader2Parallel.js'
@vue/cli 4.1.1
when I run ‘npm run build’ to pack my project
Uncaught ReferenceError: d is not defined
at DefaultWorkerPayloadHandler.handlePayload (a3ceb20b-b062-47b0-b0f2-38112620b4de:94)
at WorkerRunner.processMessage (a3ceb20b-b062-47b0-b0f2-38112620b4de:113)
at n (a3ceb20b-b062-47b0-b0f2-38112620b4de:100)
but in the dev environment(npm run server
) was fine.
Three.js version
- Dev
- r112
- …
Browser
- All of them
- Chrome
- Firefox
- Internet Explorer
OS
- All of them
- Windows
- macOS
- Linux
- Android
- iOS
Hardware Requirements (graphics card, VR Device, …)
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Vue is not defined - javascript - Stack Overflow
First, when you import the vue.js script you use type="JavaScript" as content-type which is wrong. You should remove this type parameter ...
Read more >Uncaught ReferenceError: Vue is not defined - Laracasts
I can't figure out why I'm getting this error app.js:1041 Uncaught ReferenceError: Vue is not defined at Object.VERSION (app.js:1041) at __webpack_require__ ...
Read more >ReferenceError: "x" is not defined - JavaScript - MDN Web Docs
The JavaScript exception "variable is not defined" occurs when there is a non-existent variable referenced somewhere.
Read more >ReferenceError is not defined errors in production but works in ...
I am quite new to vue.js, so I decided to start with the newest and greatest - Vue3, vite, script setup, etc. I...
Read more >How To Fix ReferenceError require is not defined in JavaScript
json file for an property called type . If that is set to module , ES6 modules will be enabled and you will...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think I have a fix for
CodeSerializer
which resolves the issue globally. I will open a PR possibly later today and ask both of you to verify it then.@cs64188 this and a regression @geoff-harper reported here #17769 have the same root cause. Independent of react and vue once the app gets build and uglified the
CodeSerializer
creates broken code for the worker as it expects the names of the classes/prototypes to be unchanged.I will investigate whether this limitation can be removed…