Skip to content
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

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

Open
kellyselden opened this issue Jul 16, 2021 · 7 comments
Open

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

kellyselden opened this issue Jul 16, 2021 · 7 comments
Labels

Comments

@kellyselden
Copy link
Member

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?

@rami-alloush
Copy link

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

@bertdeblock
Copy link
Contributor

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

@bertdeblock bertdeblock added the bug label Feb 8, 2023
@kellyselden
Copy link
Member Author

I have not.

@runspired
Copy link

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

@runspired
Copy link

runspired commented Feb 14, 2023

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

@runspired
Copy link

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

@bertdeblock
Copy link
Contributor

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
Labels
Projects
None yet
Development

No branches or pull requests

4 participants