Skip to content

Failed to import - framer-motion or entities #1335

Description

@zbysir

Failing module

import { motion } from "framer-motion"

Error message

After onload I got this:

Invalid or unexpected token (at is-prop-valid?target=es2022:3:34)

Reproduction

curl 'https://esm.sh/@emotion/is-prop-valid?target=es2022' \
  -H 'accept: */*' \
  -H 'accept-language: zh-CN,zh;q=0.9,en;q=0.8' \
  -H 'cache-control: no-cache' \
  -H 'origin: http://localhost:5173' \
  -H 'pragma: no-cache' \
  -H 'priority: u=1' \
  -H 'referer: https://esm.sh/framer-motion@12.34.5/X-ZXJlYWN0/es2022/dist/es/render/dom/utils/filter-props.mjs' \
  -H 'sec-ch-ua: "Chromium";v="146", "Not-A.Brand";v="24", "Google Chrome";v="146"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  -H 'sec-fetch-dest: script' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: cross-site' \
  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36'

The response is below, it's look like broken.

/* esm.sh - entities@4.5.0/lib/decode */
export * from "/entities@4.5.0/es2022/lib/decode.mjs";
es2022/lib/languages/roboconf.mjs";
export { default } from "/highlight.js@11.11.1/es2022/lib/languages/roboconf.mjs";
.4.0/es2022/is-prop-valid.mjs";

If delete referer and send again, it's ok :

curl 'https://esm.sh/@emotion/is-prop-valid?target=es2022' \
  -H 'accept: */*' \
  -H 'accept-language: zh-CN,zh;q=0.9,en;q=0.8' \
  -H 'cache-control: no-cache' \
  -H 'origin: http://localhost:5173' \
  -H 'pragma: no-cache' \
  -H 'priority: u=1' \
  -H 'referer: ' \
  -H 'sec-ch-ua: "Chromium";v="146", "Not-A.Brand";v="24", "Google Chrome";v="146"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  -H 'sec-fetch-dest: script' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: cross-site' \
  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36'


/* esm.sh - @emotion/is-prop-valid@1.4.0 */
import "/@emotion/memoize@^0.9.0?target=es2022";
export * from "/@emotion/is-prop-valid@1.4.0/es2022/is-prop-valid.mjs";
export { default } from "/@emotion/is-prop-valid@1.4.0/es2022/is-prop-valid.mjs";

This is the second time I've encountered this recently. The first time was a few days ago. I slept and then it got better; it seems there is nothing I can do but wait.

Metadata

Metadata

Assignees

No one assigned

    Labels

    browserNot working in Browser

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions