Unexpected token while running node example

Open
#614 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript, node.js, python
Domain
cli, compilers

Research direction

Start with the node.js compilation instructions in the linked documentation and the generated nodejs_demo.js named in the report. Reproduce the node nodejs_demo.js command and inspect the generated import statement against the reported syntax error; done means the documented example runs without the unexpected-token failure.

Written by the indexing model from the issue text.

Description

IS: bug?

Hello,
I try to run the nodejs example found here https://www.transcrypt.org/docs/html/installation_use.html
2.5. Compiling for node.js
And get unexpected token error on node nodejs_demo.js command:

import { AssertionError, AttributeError, BaseException, DeprecationWarning, Exception, IndexError, IterableError, KeyError, NotImplementedError, RuntimeWarning, StopIteration, UserWarning, ValueError, Warning, JsIterator, PyIterator, Terminal, add, and, call, class, envir, eq, floordiv, ge, get, getcm, getitem, getslice, getsm, gt, i, iadd, iand, idiv, ijsmod, ilshift, imatmul, imod, imul, in, init, ior, ipow, irshift, isub, ixor, jsUsePyNext, jsmod, k, kwargtrans, le, lshift, lt, matmul, mergefields, mergekwargtrans, mod, mul, ne, neg, nest, or, pow, pragma, proxy, pyUseJsNext, rshift, setitem, setproperty, setslice, sort, specialattrib, sub, super, t, terminal,

SyntaxError: Unexpected token {
at new Script (vm.js:85:7)
at createScript (vm.js:266:10)
at Object.runInThisContext (vm.js:314:10)
at Module._compile (internal/modules/cjs/loader.js:698:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10)
at Module.load (internal/modules/cjs/loader.js:630:32)
at tryModuleLoad (internal/modules/cjs/loader.js:570:12)
at Function.Module._load (internal/modules/cjs/loader.js:562:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:801:12)
at internal/main/run_main_module.js:21:11

Any idea?

Regards

Dominant language
Python
Stars
2.9k
Forks
218
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

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.

More from TranscryptOrg/Transcrypt

All issues in TranscryptOrg/Transcrypt

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.