codesandbox / codesandbox/codesandbox-client

Unexpected token 'export'

Open
#6,729 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
13.6k
Forks
2.4k
Avg merge
6d 19h
Merged PRs (30d)
2

Description

🐛 bug report

Preflight Checklist

  • I have read the [Contributing Guidelines][contributing] for this project.
  • I agree to follow the [Code of Conduct][code_of_conduct] that this project
    adheres to.
  • I have searched the issue tracker for an issue that matches the one I want
    to file, without success.

Description of the problem

SyntaxError Unexpected token 'export' is thrown every other run, when importing @angular/localize/init@12.x module.

How has this issue affected you? What are you trying to accomplish?

Makes running Angular 12 projects a bit annoying.

To Reproduce
  1. Run the following demo https://codesandbox.io/s/wonderful-driscoll-0uz7mo?file=/src/polyfills.ts
  2. Hit the reload button a few times
  3. Every second run fails with the same error.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the linked CodeSandbox and inspect src/polyfills.ts, where @angular/localize/init@12.x is imported. Reproduce the failure by reloading several times and trace why the intermittent Unexpected token 'export' occurs; done means repeated reloads complete without that error.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.