WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Error: prettier-plugin-ember-template-tag could not be loaded. Is it installed? #233

@jahands

Description

@jahands

Your Environment

  • Prettier version: 3.6.2
  • node version: 22.18.0
  • package manager: [email protected]
  • IDE: [CLI]

Describe the bug

There seems to be an incompatibility with the newly added ember template functionality when using this plugin with prettier-plugin-toml

To Reproduce

git clone https://github.com/jahands/prettier-sort-imports-plugin-repro.git
cd prettier-sort-imports-plugin-repro
npm i
npm run format

Expected behavior

expect it not to error like it did in earlier versions of this plugin (before ember template support was added)

Screenshots, code sample, etc

Configuration File (cat .prettierrc, prettier.config.js, .prettier.js)

See minimal repro here: https://github.com/jahands/prettier-sort-imports-plugin-repro

Error log

$ npm run format

> [email protected] format
> prettier --write .

.prettierrc.cjs 17ms (unchanged)
example.toml
[error] example.toml: Error: Error: prettier-plugin-ember-template-tag could not be loaded.  Is it installed?
[error]     at M.format (/Users/jh/src/prettier-sort-imports-plugin-repro/node_modules/@taplo/lib/dist/index.js:2:35638065)
[error]     at format (file:///Users/jh/src/prettier-sort-imports-plugin-repro/node_modules/prettier-plugin-toml/lib/index.js:10:21)
[error]     at async parse5 (file:///Users/jh/src/prettier-sort-imports-plugin-repro/node_modules/prettier/index.mjs:16731:11)
[error]     at async coreFormat (file:///Users/jh/src/prettier-sort-imports-plugin-repro/node_modules/prettier/index.mjs:17287:25)
[error]     at async formatWithCursor (file:///Users/jh/src/prettier-sort-imports-plugin-repro/node_modules/prettier/index.mjs:17504:14)
[error]     at async formatFiles (file:///Users/jh/src/prettier-sort-imports-plugin-repro/node_modules/prettier/internal/legacy-cli.mjs:4279:18)
[error]     at async main (file:///Users/jh/src/prettier-sort-imports-plugin-repro/node_modules/prettier/internal/legacy-cli.mjs:4698:5)
[error]     at async Module.run (file:///Users/jh/src/prettier-sort-imports-plugin-repro/node_modules/prettier/internal/legacy-cli.mjs:4641:5)
package-lock.json 15ms (unchanged)
package.json 1ms (unchanged)
README.md 13ms (unchanged)

Contribute to @ianvs/prettier-plugin-sort-imports

  • I'm willing to fix this bug 🥇

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions