Anton Gorbunov
Anton Gorbunov

Reputation: 1444

Do not resolve dependencies in dart 2.0 sample app project

  1. Installed JetBrains WebStorm 2018.1 EAP
  2. Installed Dart using a third-party installer by link from official site
  3. Created a new project, with default settings. Dart version 2.0.0-dev.20.0. Check Generate sample content checkbox and select Dart Web App. Create.
  4. Press Run.
  5. Get message:

No pubspec.lock file found, please run "pub get" first.

  1. Press 'get dependences'. In the window below, I get the message:

Working dir: C:\Users\Anton\Source\Front\untitled "C:\Program Files\Dart\dart-sdk\bin\pub.bat" get Resolving dependencies... Overriding the upper bound Dart SDK constraint to <=2.0.0-dev.20.0 for the following packages:

browser

To disable this you can set the PUB_ALLOW_PRERELEASE_SDK system environment variable to false, or you can silence this message by setting it to quiet. + browser 0.10.0+2 Downloading browser 0.10.0+2... Process finished with exit code -1 073 741 795

  1. I try to execute pub get through the terminal - and get the same message
  2. I add environment variable PUB_ALLOW_PRERELEASE_SDK, like this: set PUB_ALLOW_PRERELEASE_SDK=false, but but after nothing has changed
  3. I try download manually, but I can not find a description of where these files should be located, relative to the project

I'm new to the frontend and especially to dart so most likely I miss some small detail

pubspec.yaml

name: untitled
version: 0.0.1
description: A sample web application
dependencies:
  browser: any
dev_dependencies:
#  unittest: any

untitled.html

<!DOCTYPE html>
<html>
  <head>
    <link rel="stylesheet" href="untitled.css">
  </head>
  <body>
    <div id="sample_container_id">
      <p id="sample_text_id">Click me!</p>
    </div>
    <script type="application/dart" src="untitled.dart"></script>
    <script src="packages/browser/dart.js"></script>
  </body>
</html>

Upvotes: 0

Views: 421

Answers (1)

Kevin Moore
Kevin Moore

Reputation: 6171

As Gunter said, the warning about PUB_ALLOW_PRERELEASE_SDK is to be expected while using a pre-release Dart SDK.

Upvotes: 0

Related Questions