Take the 2-minute tour ×

I just tried to run an older Dart app, and I received this error:

Breaking on exception: ReferenceError: ReceivePortSync is not defined

Where does this exception come from, and how do I fix it?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

When you see ReceivePortSync is not defined, this means you're missing the interop.js script.

Simply add this:


Before the </body> tag of your page.

Also, you'll want to double check you have the js package as a dependency in your pubspec.yaml. Something like:

name: my_app
  js: any
share|improve this answer
add comment

Your Answer


