Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

stagehand --web-simple Target of URI doesn't exist #677

Open
npearson72 opened this issue Sep 10, 2020 · 1 comment
Open

stagehand --web-simple Target of URI doesn't exist #677

npearson72 opened this issue Sep 10, 2020 · 1 comment

Comments

@npearson72
Copy link

npearson72 commented Sep 10, 2020

Learning Dart and trying out stagehand for the first time.

I've built a project for the web using: stagehand --web-simple

My project structure is:

Screen Shot 2020-09-10 at 3 09 49 PM

But for some reason, import package is complaining it can't find it:

 [dart uri_does_not_exist] [E] Target of URI doesn't exist: 'package:tetris/tetris.dart' Try creating the file referenced by the URI, or Try using a URI for a file hat does exist.

This is what I have in my web/main.dart:

import 'package:tetris/tetris.dart';

void main() => Game().start();

This is in my lib/tetris.dart:

library tetris;

import 'dart:html';
import 'dart:async';
import 'dart:math';

part 'src/model/tile.dart';
part 'src/model/block.dart';
part 'src/model/blocks.dart';
part 'src/game.dart';

My pubspec.yml:

name: build_a_tetris_game
description: An absolute bare-bones web app.
# version: 1.0.0
#homepage: https://www.example.com

environment:
  sdk: '>=2.8.1 <3.0.0'

#dependencies:
#  path: ^1.7.0

dev_dependencies:
  build_runner: ^1.10.0
  build_web_compilers: ^2.11.0
  pedantic: ^1.9.0

Dart version:

Dart SDK version: 2.9.1 (stable) (Wed Aug 12 12:37:19 2020 +0200) on "macos_x64"

Any ideas?

@sarahec
Copy link

sarahec commented Sep 21, 2020

Your build.yaml says the package name is build_a_tetris_game. Change your import statement to import 'package:build_a_tetris_game/tetris.dart' and you should be golden.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants