Skip to content

Error: undefined method `value' for :call:Symbol #1434

@chimpanstache

Description

@chimpanstache

Bumping into this error:

["INFO" - 11:01:30 AM] Formatting file:///Users/.../project/app/controllers/users_controller.rb
["INFO" - 11:01:30 AM] Using config file at /Users/.../project/.prettierrc
["INFO" - 11:01:30 AM] PrettierInstance:
{
  "modulePath": "/Users/.../project/node_modules/prettier/index.cjs",
  "importResolver": {},
  "callMethodResolvers": {},
  "currentCallMethodId": 15,
  "version": "3.2.5"
}
["INFO" - 11:01:30 AM] Using ignore file (if present) at /Users/.../project/.prettierignore
["INFO" - 11:01:30 AM] File Info:
{
  "ignored": false,
  "inferredParser": "ruby"
}
["INFO" - 11:01:30 AM] Detected local configuration (i.e. .prettierrc or .editorconfig), VS Code configuration will not be used
["INFO" - 11:01:30 AM] Prettier Options:
{
  "filepath": "/Users/.../project/app/controllers/users_controller.rb",
  "parser": "ruby",
  "plugins": [
    "/Users/.../project/node_modules/@prettier/plugin-ruby/src/plugin.js"
  ]
}
["ERROR" - 11:01:30 AM] Error formatting document.
["ERROR" - 11:01:30 AM] undefined method `value' for :call:Symbol
Error: undefined method `value' for :call:Symbol
    at Socket.<anonymous> (file:///Users/.../project/node_modules/@prettier/plugin-ruby/src/plugin.js:174:23)
    at Socket.emit (node:events:529:35)
    at endReadableNT (node:internal/streams/readable:1368:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
["INFO" - 11:01:30 AM] Formatting completed in 67ms.

here are my ruby and node versions:

nodejs          16.14.2         /Users/me/.tool-versions
ruby            3.2.3           /Users/me/.tool-versions

Same versions are used inside the project repository.
Here are my Prettier and prettier-ruby versions inside my package.json file:

    "@prettier/plugin-ruby": "^3.2.2",
    "prettier": "2.7.1",

My .prettierrc file :

{
  "plugins": ["@prettier/plugin-ruby"]
}

My .prettierrc.json file :

{
 "printWidth": 80
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions