-
Notifications
You must be signed in to change notification settings - Fork 32
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
Custom javascript is not allowed | error in custom-element #25
Comments
I didn't solved yet this issue. I also recevie thi error in the console: GET https://cdn.ampproject.org/v0/amp-img-0.1.js net::ERR_ABORTED 404
amp.js:157 Powered by AMP ⚡ HTML – Version 1909141409590 https://deploy-preview-110--gatsby-starter-i18n-bulma.netlify.com/it/amp/
document-register-el…ent.patched.js:1221 Uncaught (in promise) DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "amp-img" has already been used with this registry
at x.Wc.x.define (https://cdn.ampproject.org/v0.js:67:486)
at Kj (https://cdn.ampproject.org/v0.js:290:763)
at wj.kd (https://cdn.ampproject.org/v0.js:542:58)
at vj (https://cdn.ampproject.org/v0.js:249:837)
at rj.Se (https://cdn.ampproject.org/v0.js:253:112)
at https://cdn.ampproject.org/v0.js:253:319
5
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
Maybe it is related to the order of plugins or some conflicts with some other gatsby plugin? |
It seems that this was caused because i had a wrong pathIdentifier, in gatsby-config.js i changed: + pathIdentifier: '/amp/'
- pathIdentifier: '/amp' The error
but in the amp page i haven't the canonical link instead i have:
and i don't have the amp tag in the html tag. |
@kalwalt adding a "/" to the end of the path in createPages and leaving pathIdentifier as it was worked for me |
thank you @jonoirwinrsa it worked for me too, though i have another issue related. |
@kalwalt what is the issue you have now? |
i receive this Amp error:
Custom javascript is not allowed
it point to this line:
<script async="" custom-element="amp-img" src="https://cdn.ampproject.org/v0/amp-img-0.1.js">
maybe because add the
=""
after async?page to check: https://amp-feature--gatsby-starter-i18n-bulma.netlify.com/it/amp/
kalwalt/gatsby-starter-i18n-bulma#110
The text was updated successfully, but these errors were encountered: