镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

v4.0.2 gives build error Unexpected token: punc (:) #287

Open

Description

@kellyselden

Updating to v4.0.2 gives us the following in our build logs:

error	08-Jul-2021 12:04:17	Error: Unexpected token: punc (:)
error	08-Jul-2021 12:04:17	        at TerserWriter
error	08-Jul-2021 12:04:17	-~- created here: -~-
error	08-Jul-2021 12:04:17	    at new Plugin (/node_modules/broccoli-terser-sourcemap/node_modules/broccoli-plugin/dist/index.js:47:36)

v4.0.1 is working. Are we missing a transitive dependency update? Or is there an issue with v4.0.2?

Activity

  1. rami-alloush commented on Dec 1, 2022

    @rami-alloush

    I'm still facing this year old issue! is this package deprecated?

  2. bertdeblock commented on Feb 8, 2023

    @bertdeblock
    Member

    @rami-alloush No, at the moment, it's not. @kellyselden Did you manage to figure out what was causing this?

  3. kellyselden commented on Feb 8, 2023

    @kellyselden
    MemberAuthor

    I have not.

  4. runspired commented on Feb 14, 2023

    @runspired

    confirmed its still an issue with the recent changes. @bertdeblock its due to broccoli-asset-rev prepend, can help you track down why if needed. see also ember-cli/broccoli-terser-sourcemap#310 and #275 which are all the same regression I believe

  5. runspired commented on Feb 14, 2023

    @runspired

    The code it chokes on is this:

    const file = await fetch(<<CDN_RUL>>`/translations/en-us-0875d483587e8fe8b6c09c9f9f8008f6.json`);

    note how that is outside of the backticks

    this is the original source code:

    const file = await fetch(`/translations/en-us.json`);

    It would appear that potentially broccoli-asset-rev is not handling prepend correct when backticks are in use

  6. runspired commented on Feb 14, 2023

    @runspired

    Actual issue I think: ember-cli/broccoli-asset-rev#143

  7. bertdeblock commented on Feb 14, 2023

    @bertdeblock
    Member

    ember-cli/ember-cli#9528 seems like the same issue and ember-cli/broccoli-asset-rewrite#73 was made as an attempt to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions