garycourt / uri-js

An RFC 3986 compliant, scheme extendable URI parsing/validating/normalizing/resolving library for JavaScript
Other
305 stars 69 forks source link

Issue when building using create-react-app #33

Closed DanielRHayes closed 6 years ago

DanielRHayes commented 6 years ago

I'm trying to use another module (blockstack) which requires uri-js in a react application. When I try to build the application I get the following error. create-react-app recommended I open an issue.

Creating an optimized production build...
Failed to compile.

Failed to minify the code from this file:

        ./node_modules/blockstack/node_modules/uri-js/dist/esnext/uri.js:42

Read more here: http://bit.ly/2tRViJ9
Note: Create React App can consume both CommonJS and ES modules. For Node.js compatibility, it is recommended that the main entry point is CommonJS. However, they can optionally provide an ES module entry point with the module field in package.json. Note that even if a library provides an ES Modules version, it should still precompile other ES6 features to ES5 if it intends to support older browsers.
garycourt commented 6 years ago

Have the author of blockstack upgrade to the latest version of URI.js (uri-js@^4.2.2).