cypress-movie
cypress-movie copied to clipboard
ParseError when importing commands in support/index.ts
When using
// cypress/support/index.js
import 'cypress-movie/commands'
I received an error
ParseError: 'import' and 'export' may appear only with 'sourceType: module'
I was able to resolve by importing the commands individually from src
instead like
import "cypress-movie/src/toast";
import "cypress-movie/src/clear-viewport";
I'm thinking this is a TS error but I am not familiar enough to be sure. Will continue to research.
Same here. It doesn't worked even when I added the dependencies like the example above. Someone has a suggestion of how can I solve it?
Hmm I think I forgot to transpile them to es5 when publishing, sigh
Sent from my iPhone
On Jul 28, 2020, at 19:50, Samuel Lucas [email protected] wrote:
Same here. It doesn't worked even when I added the dependencies like the example above. Someone has a suggestion of how can I solve it?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Same problem for me, the workaround worked for me too. In my case, it was:
import "cypress-movie/src/clear-viewport";
I guess this will be solved when a new release of cypress-movie
is released with TS code transpiled...
Installing the @cypress/webpack-preprocessor package should also resolve this kind of error