rollup / plugins

🍣 The one-stop shop for official Rollup plugins
MIT License
3.57k stars 568 forks source link

(Compilation) error RollupError: Expected '{', got 'interface' / token 'static' . Expected * for generator, private key, identifier or async #1690

Open LaserKaspar opened 4 months ago

LaserKaspar commented 4 months ago

Expected Behavior

Dev: Compiles without pressing CTRL-S in a random ts file. Prod: Compiles

Actual Behavior

Dev: Compiles only after pressing CTRL-S in a random ts file. Prod: Doesn't compile

Additional Information

When running cd ./server-node && npm run dev the build fails: image

When I press CTRL-S in a random file (to keep it the same for all of us I chose ./server-node/index.ts) without even modifying it the dev build magically works again. The error doesn't happen when ./shared-operations/src/workflow/operatorAccessor.ts:11 is commented: image Or the imported files are removed/commented. (./shared-operations/src/functions/*) The only file that doesn't produce an error is functions/index.ts

Only index.ts -> no error Only impose.ts -> error Only impose.ts with content of index.ts -> error

So the error seems to be dependent on the name of the file for some reason?

Depending on the files present there is another error: image

Thank you for your time!

gtalk-renato commented 2 months ago

I have the same problem. Any solution?

LaserKaspar commented 2 months ago

I have the same problem. Any solution?

How did you cause it? Maybe you could help reproduce it reliability?