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

When installing the neon-animation from npmjs, the relative link to web-animations-next-lite.min.js is broken. #184

Open
powdercloud opened this issue May 18, 2016 · 1 comment

Comments

@powdercloud
Copy link

I'm using Polymer with npm. So, to get the neon-animation package, I added this to the dependencies in my package.json:

"@polymer/neon-animation": "0.0.3",

Upon running npm install, this will pull in the neon-animation package, as node_modules/@polymer/neon-animation.

But we also need web-animations-next-lite.min.js, so I added this other dependency as well:

"web-animations-js": "2.2.1",

This gets installed in node_modules/web-animations.

Now the problem is that in this file ...
https://github.com/PolymerElements/neon-animation/blob/master/web-animations.html
... there is a relative link, and it points at a sibling directory web-animations, but it's not in fact a sibling because neon-animation is underneath @polymer, so we'd need ../../ instead of ../.

I've also tried installing the neon-animation package with bower. It doesn't have this issue because when installed with bower, it ends up in bower_components/neon-animation so it is in fact a sibling. So this is a possible workaround (not for me in particular, I'd like to stick to npm), but it would be sweet to get this to work out of the box with npm as well. I can imagine that the polyfill failing to load may cause grief to people trying to use this.

To reproduce, put this as package.json into an empty directory:
{ "name": "foo", "version": "0.1.0", "engines": { "node": "^4.0.0" }, "dependencies": { "@polymer/neon-animation": "0.0.3", "web-animations-js": "2.2.1" } }
Run npm install there and observe that the link contained in node_modules/@polymer/neon-animation/web-animations.html points at a sibling directory.

/cc: @morethanreal

@dotanlaks
Copy link

I'm experiencing exactly the same issue right now. I'm trying to migrate from bower to yarn and my build fails over this broken link issue.

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

No branches or pull requests

2 participants