prettier: [prettier-plugin-sh] v0.12.0 crashes

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.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 24 (23 by maintainers)

Most upvoted comments

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

I emailed you a zip with a simplified reproduction 👍

@JounQin can confirm that reverting and using v0.12.4 works 👍 thanks again for your help and patience. prettier-plugin-sh is awesome 🚀