Open rubennaatje opened 1 year ago
My workaround for now to get past the CI checks is to make a wrapper composable
import { AsyncDataOptions } from "nuxt/app";
export const useWrapperAsyncData = <T = any>(
...args: [string, () => Promise<T>, AsyncDataOptions<T>]
) => useAsyncData(...args);
Somehow this fixes my issue :/
Hope to find a real fix soon though!
This issue appears for me as well on Node.js 18.19.1 only on GitLab CI, the runner platform is amd64/linux.
Error:
SyntaxError: Expecting Unicode escape sequence \uXXXX (1:1)
Happens when using the @vitest/coverage-istanbul coverage provider. V8 Does work (but i have never been able to create accurate coverage reports with that)
Even when using
useLazyAsyncData
or// useAsyncData
reproduction: https://stackblitz.com/edit/nuxt-starter-1ens2b
run
pnpm run test
I hope I did this correctly, but for me it seems with latest version & latest nuxt you can reproduce this anywhere if you just add
// useAsyncData
I guess that is because of the auto imports.Stacktrace example: