This is a very edge case. I am mainly reporting it in the hope that it could possibly hide a bigger problem.
Basically, is the package name in package.json has the same name as the directory that contains a javascript file, importing from node_modules from that javascript file will fail.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi,
This is a very edge case. I am mainly reporting it in the hope that it could possibly hide a bigger problem. Basically, is the package name in package.json has the same name as the directory that contains a javascript file, importing from node_modules from that javascript file will fail.
That was a mouthful. It's easier to see by looking at this: https://glitch.com/~mire-rhodium
Assume your package.json is:
And that your index.html is:
And that your TestElement.js is:
And finally your nn/InputText.js is: (NOTE THAT nn/)
The import in
nn/InputText.js
will FAIL:GET https://mire-rhodium.glitch.me/nn/node_modules/lit-element/lit-element.js net::ERR_ABORTED 404 ImputText.js (1)
Renaming the project to "nn2" (or anything really) in
package.json
"fixes" the problem.I hope the glitch helps!