0

https://github.com/eee-c/dart-comics

I installed the Dart SDK to run the above web app. The environment is Debian. Then I migrated to the folder /dart-comics-your_first_dart_app and did a "pub install" and got the following output.

pub install
pubspec.yaml has no lower-bound SDK constraint.
You should edit pubspec.yaml to contain an SDK constraint:

environment:
  sdk: '>=2.10.0 <3.0.0'

See https://dart.dev/go/sdk-constraint 

And after that, I changed the contents of pubspec.yaml as follows, and got the following error. How can I run it?

name: Dart Comics
dependencies:
  dirty: any
  uuid: any
  json: any

environment:
  sdk: '>=2.10.0 <3.0.0'
pub install
Error on line 1, column 7 of pubspec.yaml: "name" field must be a valid Dart identifier.
  ╷
1 │ name: Dart Comics
  │       ^^^^^^^^^^^
  ╵
4

0 回答 0