load-grunt-config: aliases.yaml YAMLException

After upgrading to newest 4.0.0 version when trying to start grunt tasks I get error:

$ grunt
Loading "gruntFile.js" tasks...ERROR
>> YAMLException: Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })
Warning: Task "default" not found. Use --force to continue.

With one of the defined tasks:

$ grunt dev
Loading "gruntFile.js" tasks...ERROR
>> YAMLException: Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })
Warning: Task "dev" not found. Use --force to continue.

After downgrading to version 3.0.2 everything is running smooth.

Node version: 10.16.0

aliases.yaml definition

default:
  - 'newer:less'
  - 'newer:babel'
  - 'webpack:prod'
  - 'watch'

dev:
  - 'newer:babel'
  - 'webpack:prod'
  - 'concurrent:dev'

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 3
  • Comments: 16

Commits related to this issue

Most upvoted comments

@mbrodala just as a workaround you can try to add js-yaml@4.1.0 as a dependency in your main package.json. That is just a crazy idea, but it can do the trick.

That works indeed. But using JSON instead of YAML is already a good workaround. 😉