Skip to content

TypeError: formattedExpression.trim is not a functionΒ #87

@vizcay

Description

@vizcay

Hi πŸ‘‹

I'm getting this error on all my erb files! Any suggestion?

$ node -v
v12.21.0

$ yarn prettier --check app/**/*.rb
yarn run v1.22.11
Checking formatting...
All matched files use Prettier code style!
✨  Done in 3.01s.

$ yarn prettier --check 'app/**/*.erb'
Checking formatting...
app/views/administrador/_tabla_estudios_contables.html.erb[error] app/views/administrador/_tabla_estudios_contables.html.erb: TypeError: formattedExpression.trim is not a function
[error]     at /Users/pablo/Projects/xxx/node_modules/prettier-plugin-erb/lib/formatter.js:28:46
[error]     at Array.map (<anonymous>)
[error]     at formatMultilineExpressions (/Users/pablo/Projects/xxx/node_modules/prettier-plugin-erb/lib/formatter.js:7:6)
[error]     at Object.print (/Users/pablo/Projects/xxx/node_modules/prettier-plugin-erb/lib/printers.js:22:27)
[error]     at callPluginPrintFunction (/Users/pablo/Projects/xxx/node_modules/prettier/index.js:13787:21)
[error]     at mainPrintInternal (/Users/pablo/Projects/xxx/node_modules/prettier/index.js:13725:17)
[error]     at mainPrint (/Users/pablo/Projects/xxx/node_modules/prettier/index.js:13707:14)
[error]     at printAstToDoc (/Users/pablo/Projects/xxx/node_modules/prettier/index.js:13694:13)
[error]     at coreFormat (/Users/pablo/Projects/xxx/node_modules/prettier/index.js:14055:15)
[error]     at formatWithCursor$1 (/Users/pablo/Projects/xxx/node_modules/prettier/index.js:14284:14)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions