Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pnpm run new tries to run unknown command code #607

Open
2 tasks done
marekdedic opened this issue Nov 3, 2023 · 1 comment
Open
2 tasks done

pnpm run new tries to run unknown command code #607

marekdedic opened this issue Nov 3, 2023 · 1 comment

Comments

@marekdedic
Copy link
Contributor

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.

What version of ESLint are you using?

What version of eslint-plugin-svelte are you using?

master

What did you do?

$ pnpm install
$ pnpm run new my-rule

What did you expect to happen?

New rule files generated

What actually happened?

> eslint-plugin-svelte@2.34.1 new /home/marekdedic/eslint-plugin-svelte
> pnpm run ts ./tools/new-rule.ts "my-rule"


> eslint-plugin-svelte@2.34.1 ts /home/marekdedic/eslint-plugin-svelte
> node -r esbuild-register "./tools/new-rule.ts" "my-rule"

/bin/sh: 1: code: not found
node:internal/errors:865
  const err = new Error(message);
              ^

Error: Command failed: code "/home/marekdedic/eslint-plugin-svelte/src/rules/my-rule.ts"
/bin/sh: 1: code: not found

    at __node_internal_genericNodeError (node:internal/errors:865:15)
    at checkExecSyncError (node:child_process:887:11)
    at Object.execSync (node:child_process:959:15)
    at <anonymous> (/home/marekdedic/eslint-plugin-svelte/tools/new-rule.ts:133:5) {
  status: 127,
  signal: null,
  output: [
    null,
    Buffer(0) [Uint8Array] [],
    Buffer(28) [Uint8Array] [
       47,  98, 105, 110,  47, 115, 104,
       58,  32,  49,  58,  32,  99, 111,
      100, 101,  58,  32, 110, 111, 116,
       32, 102, 111, 117, 110, 100,  10
    ]
  ],
  pid: 23635,
  stdout: Buffer(0) [Uint8Array] [],
  stderr: Buffer(28) [Uint8Array] [
     47,  98, 105, 110,  47, 115, 104,
     58,  32,  49,  58,  32,  99, 111,
    100, 101,  58,  32, 110, 111, 116,
     32, 102, 111, 117, 110, 100,  10
  ]
}

Node.js v20.5.1
 ELIFECYCLE  Command failed with exit code 1.
 ELIFECYCLE  Command failed with exit code 1.

Seems like it tries to run the command code, which I don't have and honestly don't know what that is... Maybe VS Code? If that's the case, please don't assume everybody uses your favorite editor...

Link to GitHub Repo with Minimal Reproducible Example

https://github.com/sveltejs/eslint-plugin-svelte

Additional comments

No response

@ota-meshi
Copy link
Member

Thank you for posting the issue! We need to remove that code command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants