question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[prettier-plugin-sh] v0.12.0 crashes

See original GitHub issue

0.11.0 runs just fine

Error running prettier update on mac:

96841 Bus error: 10

Error running prettier check on mac:

97549 Bus error: 10

Error running check in linux CI:

> turbo-monorepo@1.0.0 turbo:prettier:check
> bin/prettier/check
[warn] bin/deepl/check
Error:  bin/docker/run: TypeError: Cannot read properties of undefined (reading 'Col')
Error:      at new ShParseError (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier-plugin-sh/lib/index.cjs:426:25)
Error:      at Object.parse (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier-plugin-sh/lib/index.cjs:445:17)
Error:      at Object.parse (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/index.js:7334:23)
Error:      at coreFormat (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/index.js:8645:18)
Error:      at formatWithCursor2 (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/index.js:8837:18)
Error:      at Object.formatWithCursor (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/index.js:37229:12)
Error:      at format (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/cli.js:14748:24)
Error:      at formatFiles2 (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/cli.js:14860:22)
Error:      at async main (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/cli.js:15077:5)
Error:      at async Object.run (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/cli.js:15024:5)
Error:  bin/git/ensure_repository: TypeError: Cannot read properties of undefined (reading 'Col')
Error:      at new ShParseError (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier-plugin-sh/lib/index.cjs:426:25)
Error:      at Object.parse (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier-plugin-sh/lib/index.cjs:445:17)
Error:      at Object.parse (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/index.js:7334:23)
Error:      at coreFormat (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/index.js:8645:18)
Error:      at formatWithCursor2 (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/index.js:8837:18)
Error:      at Object.formatWithCursor (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/index.js:37229:12)
Error:      at format (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/cli.js:14748:24)
Error:      at formatFiles2 (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/cli.js:14860:22)
Error:      at async main (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/cli.js:15077:5)
Error:      at async Object.run (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/cli.js:15024:5)
Error:  bin/globals/branch: TypeError: Cannot read properties of undefined (reading 'Col')
Error:      at new ShParseError (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier-plugin-sh/lib/index.cjs:426:25)
Error:      at Object.parse (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier-plugin-sh/lib/index.cjs:445:17)
Error:      at Object.parse (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/index.js:7334:23)
Error:      at coreFormat (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/index.js:8645:18)
Error:      at formatWithCursor2 (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/index.js:8837:18)
Error:      at Object.formatWithCursor (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/index.js:37229:12)
Error:      at format (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/cli.js:14748:24)
Error:      at formatFiles2 (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/cli.js:14860:22)
Error:      at async main (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/cli.js:15077:5)
Error:      at async Object.run (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/cli.js:15024:5)
Error:  bin/globals/os: TypeError: Cannot read properties of undefined (reading 'Col')
Error:      at new ShParseError (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier-plugin-sh/lib/index.cjs:426:25)
Error:      at Object.parse (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier-plugin-sh/lib/index.cjs:445:17)
Error:      at Object.parse (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/index.js:7334:23)
Error:      at coreFormat (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/index.js:8645:18)
Error:      at formatWithCursor2 (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/index.js:8837:18)
Error:      at Object.formatWithCursor (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/index.js:37229:12)
Error:      at format (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/cli.js:14748:24)
Error:      at formatFiles2 (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/cli.js:14860:22)
Error:      at async main (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/cli.js:15077:5)
Error:      at async Object.run (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/cli.js:15024:5)
Error:  bin/globals/stage: TypeError: Cannot read properties of undefined (reading 'Col')
Error:      at new ShParseError (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier-plugin-sh/lib/index.cjs:426:25)
Error:      at Object.parse (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier-plugin-sh/lib/index.cjs:445:17)
Error:      at Object.parse (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/index.js:7334:23)
Error:      at coreFormat (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/index.js:8645:18)
Error:      at formatWithCursor2 (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/index.js:8837:18)
Error:      at Object.formatWithCursor (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/index.js:37229:12)
Error:      at format (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/cli.js:14748:24)
Error:      at formatFiles2 (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/cli.js:14860:22)
Error:      at async main (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/cli.js:15077:5)
Error:      at async Object.run (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/prettier/cli.js:15024:5)
[warn] bin/third-party/turbo_install
Error:  bin/third-party/ubuntu-22/packages/autotrace: RuntimeError: memory access out of bounds
Error:      at (runtime.gcBlock).state (wasm://wasm/002c9a4a:wasm-function[161]:0x16d3d)
Error:      at (runtime.gcBlock).findHead (wasm://wasm/002c9a4a:wasm-function[171]:0x172d6)
Error:      at runtime.markRoots (wasm://wasm/002c9a4a:wasm-function[160]:0x16ca4)
Error:      at runtime.alloc (wasm://wasm/002c9a4a:wasm-function[24]:0x166b)
Error:      at github.com/rx-ts/sh-syntax/processor.Parse (wasm://wasm/002c9a4a:wasm-function[641]:0x8c4ee)
Error:      at process (wasm://wasm/002c9a4a:wasm-function[652]:0x90706)
Error:      at process.command_export (wasm://wasm/002c9a4a:wasm-function[670]:0x95e4e)
Error:      at file:///home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/sh-syntax/lib/processor.js:48:35
Error:      at Generator.next (<anonymous>)
Error:      at fulfilled (/home/ubuntu/actions-runner/_work/turbo-monorepo/turbo-monorepo/node_modules/tslib/tslib.js:115:62)
[warn] Code style issues found in 2 files. Forgot to run Prettier?
Error: Process completed with exit code 2.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:24 (16 by maintainers)

github_iconTop GitHub Comments

6reactions
JounQincommented, Jun 25, 2022

Ok, I’ll try to find out what is going on tomorrow.

3reactions
jlarmstrongivcommented, Jun 25, 2022

I emailed you a zip with a simplified reproduction 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Crash" when used with prettier and eslint · Issue #57 - GitHub
Lint crashes in the svlte compile - see stack trace; Prettier fails to format on save the ... It seems like prettier-plugin-svelte isn't...
Read more >
prettier-plugin-sh - npm
Start using prettier-plugin-sh in your project by running `npm i prettier-plugin-sh`. There are 24 other projects in the npm registry using ...
Read more >
Plugins - Prettier
Plugins are ways of adding new languages or formatting rules to Prettier. Prettier's own implementations of all languages are expressed using the plugin...
Read more >
Prettier-plugin-sh NPM - npm.io
Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing, taking various rules into account.
Read more >
realm | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found