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

babel-core SyntaxError: Unexpected token #138

Open
ni-vo opened this issue Nov 7, 2022 · 1 comment
Open

babel-core SyntaxError: Unexpected token #138

ni-vo opened this issue Nov 7, 2022 · 1 comment

Comments

@ni-vo
Copy link

ni-vo commented Nov 7, 2022

Hello,

Randomly meteor-client-bundler has stopped working for me. When trying to bundle I get the following error:

xxx/node_modules/babel-core/lib/transformation/file/index.js:558
      throw err;
      ^

SyntaxError: /var/folders/hc/7hpp_2jj0s178gbdhqwyyq8w0000gn/T/tmp-99511oI8C9JMD3EM/bundle/programs/web.browser/packages/modules.js: Unexpected token (34842:18)
  34840 | const REMOVED_MARKER = '______MONGO_OBJECT_REMOVED______';
  34841 | class MongoObject {
> 34842 |     _affectedKeys = {};
        |                   ^
  34843 |     _arrayItemPositions = [];
  34844 |     _blackboxKeys = [];
  34845 |     _genericAffectedKeys = {};
    at Parser.pp$5.raise (xxx/node_modules/babylon/lib/index.js:4454:13)
    at Parser.pp.unexpected (xxx/node_modules/babylon/lib/index.js:1761:8)
    at Parser.pp$1.parseClassProperty (xxx/node_modules/babylon/lib/index.js:2571:50)
    at Parser.pp$1.parseClassBody (xxx/node_modules/babylon/lib/index.js:2516:34)
    at Parser.pp$1.parseClass (xxx/node_modules/babylon/lib/index.js:2406:8)
    at Parser.pp$1.parseStatement (xxx/node_modules/babylon/lib/index.js:1843:19)
    at Parser.pp$1.parseBlockBody (xxx/node_modules/babylon/lib/index.js:2268:21)
    at Parser.pp$1.parseBlock (xxx/node_modules/babylon/lib/index.js:2247:8)
    at Parser.pp$3.parseFunctionBody xxx/node_modules/babylon/lib/index.js:4235:22)
    at Parser.pp$1.parseFunction (xxx/node_modules/babylon/lib/index.js:2386:8) {
  pos: 1346687,
  loc: Position { line: 34842, column: 18 },
  _babel: true,
  codeFrame: "\x1B[0m \x1B[90m 34840 | \x1B[39m\x1B[36mconst\x1B[39m \x1B[33mREMOVED_MARKER\x1B[39m \x1B[33m=\x1B[39m \x1B[32m'______MONGO_OBJECT_REMOVED______'\x1B[39m\x1B[33m;\x1B[39m\n" +
    ' \x1B[90m 34841 | \x1B[39m\x1B[36mclass\x1B[39m \x1B[33mMongoObject\x1B[39m {\n' +
    '\x1B[31m\x1B[1m>\x1B[22m\x1B[39m\x1B[90m 34842 | \x1B[39m    _affectedKeys \x1B[33m=\x1B[39m {}\x1B[33m;\x1B[39m\n' +
    ' \x1B[90m       | \x1B[39m                  \x1B[31m\x1B[1m^\x1B[22m\x1B[39m\n' +
    ' \x1B[90m 34843 | \x1B[39m    _arrayItemPositions \x1B[33m=\x1B[39m []\x1B[33m;\x1B[39m\n' +
    ' \x1B[90m 34844 | \x1B[39m    _blackboxKeys \x1B[33m=\x1B[39m []\x1B[33m;\x1B[39m\n' +
    ' \x1B[90m 34845 | \x1B[39m    _genericAffectedKeys \x1B[33m=\x1B[39m {}\x1B[33m;\x1B[39m\x1B[0m'
}

I am using version 0.6.0.

I have tried:

  • Cloned a previously working branch
  • Deleted node_modules
  • Deleted .meteor
  • Updated meteor to 2.8.0
  • Reinstalled meteor-client-bundler

Issue seems similar to: #68

@ni-vo
Copy link
Author

ni-vo commented Nov 7, 2022

Switching the "babel-core" dependency and import in bundler.js to use the newer "@babel/core" package within meteor-client-bundler solves this issue. I'll try get a PR in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant