Skip to content

Fail to execute generate NPM Script #684

@LuckyWindsck

Description

@LuckyWindsck

Tell us about your environment

  • eslint-plugin-vue-i18n version: 4.1.0 (Forked & Cloned repo)
  • Node version: v24.12.0

What did you do?

$ pnpm install
$ pnpm generate

What did you expect to happen?

Script can be executed without failure

What actually happened?

Error

$ pnpm generate

> @intlify/eslint-plugin-vue-i18n@4.1.0 generate /path/to/eslint-plugin-vue-i18n
> jiti scripts/update.ts

(node:2256) Warning: Failed to load the ES module: /path/to/eslint-plugin-vue-i18n/lib/utils/parser-config-resolver/worker.ts. Make sure to set "type": "module" in the nearest package.json file or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)

node:internal/event_target:1122
  process.nextTick(() => { throw err; });
                           ^
/path/to/eslint-plugin-vue-i18n/lib/utils/parser-config-resolver/worker.ts:2
import { runAsWorker } from 'synckit'
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at wrapSafe (node:internal/modules/cjs/loader:1692:18)
    at Module._compile (node:internal/modules/cjs/loader:1735:20)
    at Object..js (node:internal/modules/cjs/loader:1893:10)
    at Module.load (node:internal/modules/cjs/loader:1481:32)
    at Module._load (node:internal/modules/cjs/loader:1300:12)
    at TracingChannel.traceSync (node:diagnostics_channel:328:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:245:24)
    at Module.require (node:internal/modules/cjs/loader:1504:12)
    at require (node:internal/modules/helpers:152:16)
    at [worker eval]:1:2

Node.js v24.12.0
 ELIFECYCLE  Command failed with exit code 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions