Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polymer apps with subdirectories in web fail after pub build #19992

Closed
DartBot opened this issue Jul 11, 2014 · 7 comments
Closed

Polymer apps with subdirectories in web fail after pub build #19992

DartBot opened this issue Jul 11, 2014 · 7 comments
Assignees
Labels
closed-duplicate Closed in favor of an existing report P1 A high priority bug; for example, a single project is unusable or has many test failures

Comments

@DartBot
Copy link

DartBot commented Jul 11, 2014

This issue was originally filed by @butlermatt


I'm not sure if this is a Polymer transformer bug or a pub bug. When creating a project with an entry point in a subdirectory of web/ then it tests and runs fine, but once you use pub build then you receive a script error trying to load polymer.js file (it's not traversing up to the primary package directory).

To duplicate issue clone this github repo:
https://github.com/butlermatt/subdir_bug

build it, and run:

cd subdir_bug/build/web
python -m SimpleHTTPServer
Open browser to localhost:8000/test/subdir_bug.html

Check the console log.

You'll note the sources all appear to traverse to the parent package/ directory but polymer.js is still looking in the local folder

@DartBot
Copy link
Author

DartBot commented Jul 11, 2014

This comment was originally written by @butlermatt


Opps. Forgot details:

pubspec.lock is in the repo.
Dart Editor version 1.6.0.dev_03_00 (DEV)
Dart SDK version 1.6.0-dev.3.0
Linux 64-bit

@DartBot
Copy link
Author

DartBot commented Jul 11, 2014

This comment was originally written by @butlermatt


This also occurs with pub build --mode=debug using both Chrome and Dartium:

Dartium output:
Failed to load resource: the server responded with a status of 404 (Not Found)
  http://<domain>/<dir>/packages/polymer/src/js/polymer/polymer.js
Failed to load resource: the server responded with a status of 404 (Not Found)
  http://<domain>/<dir>/packages/browser/dart.js
Failed to load resource: the server responded with a status of 404 (Not Found)
  http://<domain>/<dir>/packages/polymer/polymer.
... And many more.

@DartBot
Copy link
Author

DartBot commented Jul 11, 2014

This comment was originally written by @zoechi


Is this a dupe of https://code.google.com/p/dart/issues/detail?id=18563 ?

@DartBot
Copy link
Author

DartBot commented Jul 11, 2014

This comment was originally written by @butlermatt


No. In Issue #18563 it's relative files and where Chrome/Dartium determine the file is loaded from. For instance, that issue could be resolved by using absolute paths.

In this issue it's that the transformers aren't rewriting 'package' in the right location, in particular it seems they're hardcoded to look in the current directory for packages folder, even when other areas of the app explicitly indicate otherwise.

@dgrove
Copy link
Contributor

dgrove commented Jul 11, 2014

Set owner to @sigmundch.
Removed Priority-Unassigned label.
Added Priority-High, Pkg-Polymer, Triaged labels.

@sigmundch
Copy link
Member

Hey Matt, I think this is a duplicate of:

https://code.google.com/p/dart/issues/detail?id=17596

We were actually just about to get to work on fixing it, so I'm expecting the fix will be available soon.


Added Duplicate label.
Marked as being merged into #17596.

@DartBot DartBot added Type-Defect P1 A high priority bug; for example, a single project is unusable or has many test failures closed-duplicate Closed in favor of an existing report labels Jul 11, 2014
@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This issue has been moved to dart-archive/polymer-dart#236.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-duplicate Closed in favor of an existing report P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

3 participants