-
Notifications
You must be signed in to change notification settings - Fork 87
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
WARNING: Multiple instances of Three.js being imported #274
Comments
I got the same warning with
package.json {
"name": "rpg",
"version": "1.0.0",
"main": "AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web"
},
"dependencies": {
"expo": "~46.0.13",
"expo-gl": "^11.4.0",
"expo-status-bar": "~1.4.0",
"expo-three": "^6.2.0",
"expo-updates": "~0.14.6",
"react": "18.0.0",
"react-dom": "^18.0.0",
"react-native": "0.69.6",
"react-native-web": "^0.18.9",
"three": "^0.127.0"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@types/react": "~18.0.14",
"@types/react-native": "~0.69.1",
"@types/three": "^0.127.1",
"babel-plugin-react-native-web": "^0.18.9",
"typescript": "~4.3.5"
},
"private": true
} Metro console warning and errors WARNING: Multiple instances of Three.js being imported.
at node_modules\expo\build\environment\react-native-logs.fx.js:null in warn
at node_modules\expo-three\build\suppressWarnings.native.js:null in global.console.warn
at node_modules\three\build\three.module.js:null in <global>
at node_modules\metro-runtime\src\polyfills\require.js:null in loadModuleImplementation
at node_modules\three\examples\jsm\loaders\ColladaLoader.js:null in <global>
at node_modules\metro-runtime\src\polyfills\require.js:null in loadModuleImplementation
at node_modules\expo-three\build\loaders\loadModelsAsync.js:null in <global>
at node_modules\metro-runtime\src\polyfills\require.js:null in loadModuleImplementation
at node_modules\expo-three\build\loadAsync.js:null in <global>
at node_modules\metro-runtime\src\polyfills\require.js:null in loadModuleImplementation
at node_modules\expo-three\build\ExpoTHREE.js:null in <global>
at node_modules\metro-runtime\src\polyfills\require.js:null in loadModuleImplementation
at node_modules\expo-three\build\index.js:null in <global>
at node_modules\metro-runtime\src\polyfills\require.js:null in loadModuleImplementation
at src\components\Canvas.tsx:null in <global>
at node_modules\metro-runtime\src\polyfills\require.js:null in loadModuleImplementation
at src\App.tsx:null in <global>
at node_modules\metro-runtime\src\polyfills\require.js:null in loadModuleImplementation
at AppEntry.js:null in <global>
at node_modules\metro-runtime\src\polyfills\require.js:null in loadModuleImplementation
at node_modules\metro-runtime\src\polyfills\require.js:null in guardedLoadModule
at http://192.168.0.103:19000/AppEntry.bundle?platform=android&dev=true&hot=false&strict=false&minify=false:null in global code
TypeError: element.setAttribute is not a function. (In 'element.setAttribute(eventName, 'return;')', 'element.setAttribute' is undefined)
at node_modules\expo\build\environment\react-native-logs.fx.js:null in error
at node_modules\react-native\Libraries\Core\ExceptionsManager.js:null in reportException
at node_modules\react-native\Libraries\Core\ExceptionsManager.js:null in handleException
at node_modules\react-native\Libraries\Core\setUpErrorHandling.js:null in handleError
at node_modules\expo\build\errors\ExpoErrorManager.js:null in errorHandler
at node_modules\expo\build\errors\ExpoErrorManager.js:null in <anonymous>
at node_modules\@react-native\polyfills\error-guard.js:null in ErrorUtils.reportFatalError
at node_modules\metro-runtime\src\polyfills\require.js:null in guardedLoadModule
at http://192.168.0.103:19000/AppEntry.bundle?platform=android&dev=true&hot=false&strict=false&minify=false:null in global code
Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.
at node_modules\expo\build\environment\react-native-logs.fx.js:null in error
at node_modules\react-native\Libraries\Core\ExceptionsManager.js:null in reportException
at node_modules\react-native\Libraries\Core\ExceptionsManager.js:null in handleException
at node_modules\react-native\Libraries\Core\setUpErrorHandling.js:null in handleError
at node_modules\expo\build\errors\ExpoErrorManager.js:null in errorHandler
at node_modules\expo\build\errors\ExpoErrorManager.js:null in <anonymous>
at node_modules\@react-native\polyfills\error-guard.js:null in ErrorUtils.reportFatalError
at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:null in __guard
at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:null in callFunctionReturnFlushedQueue |
@madam97 Were you able to find the solution ? |
Maybe its somehow connected to this from official docs?
However weren't sure where to add this and it didn't helped me |
I haven't been able to solve this problem yet, but if I will find the solution, I will write it down here. I'm using TypeScript so I needed to add EDIT: I moved the |
Wasn't able to find the solution too |
Hello, I have a setup
expo-tree
, expo 46.0.0,THREE v0.127
and I get this warning in the console. Any ideas how to fix this?The text was updated successfully, but these errors were encountered: