socket.io-client icon indicating copy to clipboard operation
socket.io-client copied to clipboard

yarn build error

Open kenneth opened this issue 7 years ago • 25 comments

yarn run v1.19.1 $ react-scripts build Creating an optimized production build... Failed to compile.

Failed to minify the code from this file:

./node_modules/socket.io-client/node_modules/debug/src/browser.js:155

Read more here: http://bit.ly/2tRViJ9

error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

kenneth avatar Oct 15 '19 03:10 kenneth

Facing same issue

Malik-Adil avatar Oct 17 '19 09:10 Malik-Adil

Facing same issue using npm and react-script

jadok avatar Oct 24 '19 07:10 jadok

Facing same issue.. any idea? I upgraded version to latest version. but still no luck

victoria100 avatar Nov 04 '19 01:11 victoria100

Same here

anotheri avatar Nov 04 '19 15:11 anotheri

I got same issue

updev-repo avatar Nov 05 '19 03:11 updev-repo

Please try to downgrade socket.io-client version to 1.7.0, then above issue will be gone away

updev-repo avatar Nov 06 '19 01:11 updev-repo

oh my gosh @guixiao417 thanks, it worked for me! Thank you!

victoria100 avatar Nov 06 '19 02:11 victoria100

@guixiao417 it works!

aliriomendezjr avatar Nov 25 '19 19:11 aliriomendezjr

@guixiao417 works for me.

hscspring avatar Dec 19 '19 02:12 hscspring

Is it possible to keep using the newest stable version of the socket.io-client with react-scripts? Downgrading is not really a solution for me.

krzywiecki avatar Apr 03 '20 21:04 krzywiecki

thre is a way insted of downgrade? all of my modual are update to the laste verion.

mahshid22 avatar Apr 18 '20 08:04 mahshid22

I tried but it was not working for last version

On Sat, Apr 18, 2020 at 4:33 PM mahshid22 [email protected] wrote:

thre is a way insted of downgrade? all of my modual are update to the laste verion.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/socketio/socket.io-client/issues/1330#issuecomment-615761081, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKYG6AGEG2PIRG5Z5YPV3D3RNFQV5ANCNFSM4JAWTPRQ .

updev-repo avatar Apr 18 '20 12:04 updev-repo

@guixiao417 you saved my day thanks a lot

Gauthamjm007 avatar Apr 19 '20 09:04 Gauthamjm007

My pleasure

On Sun, Apr 19, 2020 at 5:20 PM Goutham JM [email protected] wrote:

@guixiao417 https://github.com/guixiao417 you saved my day thanks a lot

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/socketio/socket.io-client/issues/1330#issuecomment-616083860, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKYG6AGENO7RSCWRZB6QCOLRNK65VANCNFSM4JAWTPRQ .

updev-repo avatar Apr 20 '20 01:04 updev-repo

I updated react-script to latest (3.4.1 at this time) and followed the instructions from yarn build. Ended up removing babel-eslint and eslint and was able to build successfully.

chenbrian avatar Apr 22 '20 08:04 chenbrian

Also not happy with the approach of downgrading to an old version, but it's the only thing that works for us at the moment.

tmaximini avatar Apr 24 '20 07:04 tmaximini

This bug messed me up. The downgrading way is a good solution. I can only use the latest version through script which annoys me.

lovefengruoqing avatar Apr 26 '20 07:04 lovefengruoqing

What I ended up doing was, download socket.io-client latest 2.3.0 and save it in ./client/scripts/vendor, then use a webpack alias:

  resolve: {
    alias: {
      'socket-io.client': __dirname + '/client/scripts/vendor/socket.io-client.2.3.0'
    }
  },

This compiled fine and did not produce any yarn build errors.

tmaximini avatar Apr 26 '20 07:04 tmaximini

Please try to downgrade socket.io-client version to 1.7.0, then above issue will be gone away

Thx bro u da best!!! It works thank you!!

jxooi00 avatar May 26 '20 04:05 jxooi00

I complete remove socket.io and my problem was fixed. thanks!

Pedroxam avatar Jul 05 '20 19:07 Pedroxam