문제

I am working on an http server POC based on the route package demo. It requires the path package which states that my pubspec.yaml file contain the folowing:

name: poc
description: Proof of Concept
dependencies:
  route: any
  path:any

The editor marks the word path as a reserved word and when I do a pub get I get an error

Pub get failed, [1] Syntax error on line 5, column 11: invalid YAML in plain scalar

which is the line that has the path dependency. How do I resolve this?

Dart Editor version 1.0.0_r30338 (DEV) Dart SDK version 1.0.0.7_r30338

도움이 되었습니까?

해결책

You are missing a space:

 path:any

Should be:

 path: any

I get the same error without a space on any item in the pubspec.yaml

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top