You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am trying to upgrade to v8, however, I am at a loss as to how to use this package... I have read the linked gist and I am on node 20, so I think I have all the prerequisites ready... However, given that this is a gulp plugin, I am a bit lost when it comes to the state of ESM in gulpfiles...
If I keep const filter = require("gulp-filter");, I get Error [ERR_REQUIRE_ESM]: require() of ES Module...
If I switch it to const filter = await import("gulp-filter");, I get SyntaxError: await is only valid in async functions and the top level bodies of modules
If I switch to import filter from "gulp-filter";, I get SyntaxError: Cannot use import statement outside a module. This happens even when I convert all import to this style...
So it seems to me like gulpfiles cannot use ESM? If that's the case, does that mean v8 is unusable without a preprocessor like ts-node?
The text was updated successfully, but these errors were encountered:
Hi,
I am trying to upgrade to v8, however, I am at a loss as to how to use this package... I have read the linked gist and I am on node 20, so I think I have all the prerequisites ready... However, given that this is a gulp plugin, I am a bit lost when it comes to the state of ESM in gulpfiles...
const filter = require("gulp-filter");
, I getError [ERR_REQUIRE_ESM]: require() of ES Module...
const filter = await import("gulp-filter");
, I getSyntaxError: await is only valid in async functions and the top level bodies of modules
import filter from "gulp-filter";
, I getSyntaxError: Cannot use import statement outside a module
. This happens even when I convert all import to this style...So it seems to me like gulpfiles cannot use ESM? If that's the case, does that mean v8 is unusable without a preprocessor like
ts-node
?The text was updated successfully, but these errors were encountered: