小编Rob*_*ter的帖子

TypeError: WebAssembly.instantiate(): Import #0 module="env" 错误:模块不是对象或函数

我们目前正在开发一个使用 Next.js 和 Three.js (react- Three-Fiber) 的项目。清除浏览器中的缓存后,3D模型不再显示。我们得到一些错误。实际上一个警告一个错误(多次)。错误是

Uncaught (in promise) RuntimeError: abort(TypeError: WebAssembly.instantiate(): Import #0 module="env" error: module is not an object or function). Build with -s ASSERTIONS=1 for more info.
Run Code Online (Sandbox Code Playgroud)

我们确实使用了一些环境变量,但没有特别导入模块“env”。参数(“-s ASSERTIONS = 1”)对我们不起作用。

控制台输出开头出现的另一个警告是:

failed to asynchronously prepare wasm: TypeError: WebAssembly.instantiate(): Import #0 module="env" error: module is not an object or function
Run Code Online (Sandbox Code Playgroud)

该错误有时出现,有时不出现,我们不知道为什么。

谢谢你的任何事

编辑:

"dependencies": {
  "@heroicons/react": "^1.0.1",
  "@next/env": "^11.1.2",
  "@react-three/drei": "^2.2.13",
  "@tweenjs/tween.js": "^18.6.4",
  "autoprefixer": "^10.2.5",
  "axios": "^0.21.1",
  "drei": "^2.2.13",
  "framer-motion": "^4.1.8",
  "iso-3166-1": "^2.0.1",
  "jwt-decode": "^3.1.2",
  "moment": …
Run Code Online (Sandbox Code Playgroud)

reactjs webassembly next.js react-three-fiber

5
推荐指数
1
解决办法
1702
查看次数

任务“:app:mergeDebugResources”的 Flutter 构建失败

目前我正在学习 Flutter。

\n

今天我遇到了这个错误:

\n
FAILURE: Build failed with an exception.\n\n* What went wrong:\nExecution failed for task ':app:mergeDebugResources'.\n> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade\n   > Android resource compilation failed\n     C:\\Users\\USERNAME\\Documents\\Flutter\\my-app\\android\\app\\src\\main\\res\\values\\colors.xml:3:5-78: AAPT: error: invalid color.\n\n     C:\\Users\\USERNAME\\Documents\\Flutter\\my-app\\build\\app\\intermediates\\incremental\\mergeDebugResources\\merged.dir\\values\\values.xml: AAPT: error: file failed to compile.\n\n\n* Try:\nRun with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.\n\n* Get more help at https://help.gradle.org\n\nBUILD FAILED in 23s\n
Run Code Online (Sandbox Code Playgroud)\n

经过几个小时的搜索后我已经尝试过:

\n
    \n …

android build gradle flutter

4
推荐指数
1
解决办法
1万
查看次数