-
Notifications
You must be signed in to change notification settings - Fork 66
Running into an import problem with Polymer 3 #231
Comments
Nevermind. It appears that node's resolution algorithm solves this issue by setting the module resolution to polymer serve --module-resolution=node |
Still broken if you don't use index.html
console output
|
I'm running into this too. I'm using the http-server node package and plan to use nginx for hosting. I vote for re-opening this issue until we've found a solution. @mkay581 could you reopen it, please? |
Sure reopened |
@aemonge Did you actually build the app? I had to build it and host it from the build output directory. Before that I was hosting from the project root folder which caused the issue. My build config section in polymer.json:
When I run
and host it from the output folder
everything works as expected, because during the build, the named module "@ polymer" will be replaced by the file path expression "./node_modules/@ polymer". @aemonge Can you validate that? |
I just validated it and is working after Hurray ! |
Similar issue, with Chrome throwing the following error on import statement(s): I think import statements should have relative path - do they not? |
@govis You need to build your project - as explained above. |
Thanks @robertfoobar for suggestion, but why unnecessary step of having to build to fix incorrect import? A simple hello word example would run just fine without building providing the import statements are pointing to the right place. |
Closing since solution has been implemented. |
How to solve this issue while using these components in web app created using python-django. Getting this error while importing the paper elements. @mkay581 could you please reopen so that we can find a solution for this |
Getting the same issue when importing in pure HTML using http-server. I want to use the components I build with the Polymer in plain HTML. |
Reopening at the request of others. |
Any news on this one? We ran into the same problem in the project that I am part of, we just updated our main components and now using polymer 3 versions but still loading polymer 2 components that will take more time to be migrated. Any suggestions? |
@conceptree , did you get any solution on this brother?. we are running into this issue when we try to do development with polymer serve |
@kevinpschaaf no! We gave up and moved to stencil JS and for the components that were abstracting other polymer based components we just removed those and implemented our own or changed to Vaadin components. We still maintain older versions of our product so if there is a fix for this it can still be useful for us! Drop it here 😄 |
Description
I'm attempting to use the
app-location
element provided by the version of this package using polymer 3but when this file is rendered, it gives me the following error in the console:
After inspecting, it is failing on the the import lines in app-location.js.
I suspect this is due to a resolver issue since the
import
path is not relative? Any help would be appreciated. ThanksThe text was updated successfully, but these errors were encountered: