Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot create property 'url' on string 'object' #916

Open
1 of 4 tasks
rameshx opened this issue Sep 1, 2023 · 0 comments
Open
1 of 4 tasks

TypeError: Cannot create property 'url' on string 'object' #916

rameshx opened this issue Sep 1, 2023 · 0 comments

Comments

@rameshx
Copy link

rameshx commented Sep 1, 2023

Describe the bug

I'm using monaco-yaml with react-monaco-editor, and I'm seeing the below error in the console and validation, schema-based suggestions are not working. The error is also displayed every time the YAML is edited.

TypeError: Cannot create property 'url' on string 'object'
    at _validateObjectNode (https://localhost:8181/yaml.worker.a42e65.js:36085:32)
    at validate2 (https://localhost:8181/yaml.worker.a42e65.js:35533:7)
    at testAlternatives (https://localhost:8181/yaml.worker.a42e65.js:35610:9)
    at _validateNode (https://localhost:8181/yaml.worker.a42e65.js:35654:7)
    at validate2 (https://localhost:8181/yaml.worker.a42e65.js:35547:3)
    at _validateObjectNode (https://localhost:8181/yaml.worker.a42e65.js:36087:13)
    at validate2 (https://localhost:8181/yaml.worker.a42e65.js:35533:7)
    at SingleYAMLDocument.validate (https://localhost:8181/yaml.worker.a42e65.js:35478:7)
    at getDiagnostics (https://localhost:8181/yaml.worker.a42e65.js:34011:47)
    at https://localhost:8181/yaml.worker.a42e65.js:34048:16

YAML:

template:
  name: yaml validation error template
  identifier: yaml_validation_error_template
  versionLabel: "1"
  type: Step
  projectIdentifier: test
  orgIdentifier: default
  tags: {}
  spec:
    type: Wait
    spec:
      duration: 10m

Schema: https://raw.githubusercontent.com/harness/harness-schema/dc42a2b54209b66a635734d4fa8b891a7903a63f/v0/template.json

Expected Behavior

Features like code completion, validation, etc., work as expected

Current Behavior

Seeing errors related to validation in the console

Environment

  • Windows
  • Mac
  • Linux
  • other (please specify)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant