-
Notifications
You must be signed in to change notification settings - Fork 1
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
"Uncaught SyntaxError: import declarations may only appear at top level of a module" #540
Comments
@mccalluc for what is worth, the file referenced I wonder if we could/should pull this file out of the pipeline and reference it another way, for example via |
More info: The pulldown with the NetID works on initial load of |
I'm also seeing this on production, so it may not be a new error. |
This doesn't show up in the dev environment: it's related to the production asset pipeline... I also wasn't able to run production locally:
... and trying to precompile assets and tweak dev config didn't work either... but it probably could have. Looking at the history: This was introduced in and moved to I'll try reverting that and deploying to stage. |
Important -- The key to reproducing this is coming to the site via a VPN proxy URL like https://vpn.princeton.edu/https/pdc-describe-prod.princeton.edu/describe/ |
Let's investigate this issue. Do we need to take action in the code? |
I am struggling to reproduce this error. As such, I am going to please propose that this be reviewed. |
As I still could not reproduce this error, I am going to close this in order to proceed. |
I've just deployed v0.32.0 to staging. I logged in, and I'm trying to click on the button with my NetID, but no pulldown appears: Instead in the console I see this error:
(This is not a recipe for a reproducer... I'm not sure exactly what I did before I got here.)
The link to the bad JS is https://vpn.princeton.edu/https/pdc-describe-staging.princeton.edu/describe/vite/assets/application.4e0043f6.js
(following code truncated)
It seems that the asset bundler isn't handling ES Modules? I'm not sure if this code changed recently.
The text was updated successfully, but these errors were encountered: