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

[dcons] "Unexpected token" #325

Closed
loganpowell opened this issue Oct 28, 2021 · 3 comments
Closed

[dcons] "Unexpected token" #325

loganpowell opened this issue Oct 28, 2021 · 3 comments

Comments

@loganpowell
Copy link
Contributor

Hi @postspectacular, back again with another ... question?

./node_modules/@thi.ng/dcons/dcons.js 558:22
Module parse failed: Unexpected token (558:22)
File was processed with these loaders:
 * ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
|     if (this._length < 2) return this;
|
>     for (iter = iter ?? Math.ceil(1.5 * Math.log2(this._length)); iter > 0; iter--) {
|       let cell = this.head;
|

Any ideas?

@loganpowell
Copy link
Contributor Author

btw, you were right about the brittleness of the edge tooling...

postspectacular added a commit that referenced this issue Oct 28, 2021
- refactor using ternary op
- AFAICT only occurrence in entire umbrella repo
@postspectacular
Copy link
Member

Fixed and released! (v3.0.7) What tooling are you using? This package is a dependency of quite a few other umbrella packages and I've not come across this issue (though myself am only using snowpack for browser or otherwise nodejs 16.11/17.0.1)

A global search shows that this was the only instance of using this new Ecmascript operator, so hopefully no other similar surprises... 😉

@loganpowell
Copy link
Contributor Author

loganpowell commented Oct 28, 2021

It's a create-react-app toolchain. There are a number of issues with the support of various es features. What specifically about the code above is edgy?

Edit: ah, I see, nullish coalescing. I'm also sticking with Node 14 until AWS supports a higher version.

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

2 participants