Skip to content
This repository has been archived by the owner on Mar 5, 2023. It is now read-only.

Error: 'Machine' is not exported by node_modules/@xstate/compiled/index.js (rollup) #56

Open
pyoner opened this issue Oct 10, 2020 · 2 comments
Assignees

Comments

@pyoner
Copy link
Contributor

pyoner commented Oct 10, 2020

Problem:
Rollup cannot import {Machine} from "@xstate/compiled"

How to fix?
I added a index.es.js file:

export * from  "xstate"

And patched package.json:

{
  "name": "@xstate/compiled",
  "main": "index.js",
  "module": "index.es.js",
  "version": "0.0.4"
}
@mattpocock mattpocock self-assigned this Oct 10, 2020
@mattpocock
Copy link
Owner

Nice. This looks fine to add.

Probably also needs one for react too.

pyoner added a commit to pyoner/xstate-codegen that referenced this issue Oct 11, 2020
@pyoner
Copy link
Contributor Author

pyoner commented Oct 11, 2020

I have added a template index.es.js only in the PR #57

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants