node failing due to unexpected character '#'
pkieltyka opened this issue · 8 comments
Module parse failed: Unexpected character '#' (45:2)
| */
| class BlobDataItem {
> #path
| #start
seems to be a new JS language feature I've never seen either, and my js compiler is having a challenge as well: https://github.com/node-fetch/fetch-blob/blob/main/from.js#L60-L61
@pkieltyka which version of Node are you running? You need at least 12.20 or 14.13, as indicated here:
Line 29 in dc29588
@ThornWalli are you packaging for the browser? The browser already has it's own Blob
and File
, this is for the Node.js runtime...
I use the package ‘cross-blob‘.
https://www.npmjs.com/package/cross-blob
The background here is the client and server build.
Do you actually get any errors, or are you just getting warnings about node:*
imports? This issue is specifically about the Module parse failed: Unexpected character '#'
error...
Think you should rather do some code splitting, do some conditional loading to load fetch-blob only when needed.
Got no more response...
just update your dependencies, all evergreen browser and backends all do support private class field right now...