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
It was working with vite-node ./my/script.ts, now it shows
> vite-node my/script
xxx/node_modules/.pnpm/minimatch@9.0.1/node_modules/minimatch/dist/mjs/index.js:126
AST: class __vite_ssr_import_2__.AST extends orig.AST {
^
SyntaxError: Unexpected token '.'
at new Script (node:vm:100:7)
at createScript (node:vm:259:10)
at Object.runInThisContext (node:vm:307:10)
at ViteNodeRunner.directRequest (file://xxx/node_modules/.pnpm/vite-node@0.31.2_@types+node@18.16.18/node_modules/vite-node/dist/client.mjs:321:19)
at ViteNodeRunner.cachedRequest (file://xxx/node_modules/.pnpm/vite-node@0.31.2_@types+node@18.16.18/node_modules/vite-node/dist/client.mjs:184:14)
at ViteNodeRunner.dependencyRequest (file://xxx/node_modules/.pnpm/vite-node@0.31.2_@types+node@18.16.18/node_modules/vite-node/dist/client.mjs:219:12)
at xxx/node_modules/.pnpm/glob@10.2.7/node_modules/glob/dist/mjs/index.js:1:31
at ViteNodeRunner.directRequest (file://xxx/node_modules/.pnpm/vite-node@0.31.2_@types+node@18.16.18/node_modules/vite-node/dist/client.mjs:326:5)
at ViteNodeRunner.cachedRequest (file://xxx/node_modules/.pnpm/vite-node@0.31.2_@types+node@18.16.18/node_modules/vite-node/dist/client.mjs:184:14)
at ViteNodeRunner.dependencyRequest (file://xxx/node_modules/.pnpm/vite-node@0.31.2_@types+node@18.16.18/node_modules/vite-node/dist/client.mjs:219:12)
Node.js v18.16.0
ELIFECYCLE Command failed with exit code 1.
Describe the bug
It was working with
vite-node ./my/script.ts
, now it showsReproduction
https://stackblitz.com/edit/vitest-dev-vitest-kffe8s
In this example, run
npm run rep
will replicate the issue. As a counter example,npm run rep-tsx
will execute without a problem.Simply run with
rimraf('*.tmp', { glob: true })
it will raise the exception.System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: