-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Bug Report
With perspective master branch, it builds fine in python setup but failing to build in Javascript setup with following error:
Steps to Reproduce:
- Clone the master branch from github
- select Javascript setup
- yarn build ... I did get some other errors before getting to this which were because of missing dependencies and got fixed after I installed them.
Expected Result:
Build to work fine.
Actual Result:
$ babel src/js --source-maps --out-dir dist/esm
SyntaxError: src/js/api/client.js: Unexpected token (61:83)
59 | this.send(msg);
60 |
> 61 | if ((msg.cmd === "table" || msg.cmd === "view") && !this._features?.wait_for_response && resolve) {
| ^
62 | resolve();
63 | }
64 | });
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "build:babel:esm" exited with 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn build exited 1 in '@finos/perspective'
lerna ERR! yarn build exited 1 in '@finos/perspective'
After doing google search, it seems this is babel optional-chaining feature which webpack is not recognizing. I checked
I have @babel/preset-env plugin. These are the versions of babel and webpack on my system
axihemant@hb-finos:~/finos/perspective$ npm list webpack
/home/baxihemant/finos/perspective
└── webpack@4.46.0
baxihemant@hb-finos:~/finos/perspective$ npm list babel
/home/baxihemant/finos/perspective
└── babel@6.23.0
baxihemant@hb-finos:~/finos/perspective$ npm list babel-cli
/home/baxihemant/finos/perspective
└── babel-cli@6.26.0
baxihemant@hb-finos:~/finos/perspective$ npm list @babel/preset-env
/home/baxihemant/finos/perspective
└── @babel/preset-env@7.14.2
Environment:
master branch
OS : Ubuntu 20.10
npm -v
6.14.8
Virtualized environment
Thanks,
Hemant