Skip to content

WASM support: Target dart2wasm failed: ProcessException: Process exited abnormally with exit code 64 #102

@jaredsburrows

Description

@jaredsburrows

Repro:

flutter build web --wasm

Error:

Target dart2wasm failed: ProcessException: Process exited abnormally with exit code 64:
../../.pub-cache/hosted/pub.dev/universal_html-2.2.4/lib/src/_sdk/js.dart:32:1: Error: JS interop library 'dart:js' can't be imported when compiling to Wasm.
Try using 'dart:js_interop' or 'dart:js_interop_unsafe' instead.
export 'dart:js';
^
  Command: /opt/homebrew/Caskroom/flutter/3.24.0/flutter/bin/cache/dart-sdk/bin/dart compile wasm --packages=.dart_tool/package_config.json
  --extra-compiler-option=--platform=/opt/homebrew/Caskroom/flutter/3.24.0/flutter/bin/cache/flutter_web_sdk/kernel/dart2wasm_platform.dill
  --extra-compiler-option=--delete-tostring-package-uri=dart:ui --extra-compiler-option=--delete-tostring-package-uri=package:flutter
  --extra-compiler-option=--import-shared-memory --extra-compiler-option=--shared-memory-max-pages=32768 -Ddart.vm.product=true -DFLUTTER_WEB_AUTO_DETECT=false
  -DFLUTTER_WEB_USE_SKIA=false -DFLUTTER_WEB_USE_SKWASM=true
  -DFLUTTER_WEB_CANVASKIT_URL=https://www.gstatic.com/flutter-canvaskit/b8800d88be4866db1b15f8b954ab2573bba9960f/
  --extra-compiler-option=--depfile=/Users/<>/repo/<>/.dart_tool/flutter_build/a9cc494279a9de546c04f05a4f4b7194/dart2wasm.d -O4 --strip-wasm -o
  /Users/<>/repo/<>/.dart_tool/flutter_build/a9cc494279a9de546c04f05a4f4b7194/main.dart.wasm
  /Users/<>/repo/<>/.dart_tool/flutter_build/a9cc494279a9de546c04f05a4f4b7194/main.dart

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions