简体   繁体   中英

@feathersjs/client @feathersjs/socketio-client build fail

Used create-react-app. added the client and socketio-client.

dev server runs fine.

go to build :

Failed to minify the code from this file:

  ./node_modules/@feathersjs/socketio-client/lib/index.js:10 

thought I must've messed something up. so download the basic feathers chat react client example. dev server runs fine. go to build :

static/js/main.b9a07b83.js from UglifyJs SyntaxError: Unexpected token punc «,», expected punc «:» [./~/@feathersjs/commons/lib/commons.js:6,49]

error Command failed with exit code 1.

I thought the client js files in the feathers library were written to be ES5 browser compatible/buildable w/ create-react-app. but for some reason, during build they are throwing these errors.

I have no clue how to fix this without having to eject webpack config (from react-scripts) include es2015 preloader.

Is there an easier way? I must have something configured incorrectly, bc the basic feathers/react chat example isn't even building...

Reproduce:

It was a mistake in the example application. As documented in the usage with create-react-app anything that needs a pre-transpiled version should use @feathersjs/client .

It is now fixed in the feathersjs-ecosystem/feathers-chat-react repository (with this commit ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM