Open
Description
I get the following error after updating from mysql2@^1.6.5
to mysql2@^1.7.0
.
ReferenceError: You are trying to `import` a file after the Jest environment has been torn down.
at Object.getCodec (node_modules/mysql2/node_modules/iconv-lite/lib/index.js:65:27)
at Object.getDecoder (node_modules/mysql2/node_modules/iconv-lite/lib/index.js:127:23)
at Object.<anonymous>.exports.decode (node_modules/mysql2/lib/parsers/string.js:10:25)
at Packet.readNullTerminatedString (node_modules/mysql2/lib/packets/packet.js:384:25)
at Function.fromPacket (node_modules/mysql2/lib/packets/handshake.js:58:33)
C:\Users\siroc\repositories\sphinxql\node_modules\mysql2\node_modules\iconv-lite\lib\index.js:106
throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')");
^
Error: Encoding not recognized: 'cesu8' (searched as: 'cesu8')
at Object.getCodec (C:\Users\siroc\repositories\sphinxql\node_modules\mysql2\node_modules\iconv-lite\lib\index.js:106:23)
at Object.getDecoder (C:\Users\siroc\repositories\sphinxql\node_modules\mysql2\node_modules\iconv-lite\lib\index.js:127:23)
at Object.<anonymous>.exports.decode (C:\Users\siroc\repositories\sphinxql\node_modules\mysql2\lib\parsers\string.js:10:25)
at Packet.readNullTerminatedString (C:\Users\siroc\repositories\sphinxql\node_modules\mysql2\lib\packets\packet.js:384:25)
siroc\repositories\sphinxql\node_modules\mysql2\lib\packets\handshake.js:58:33)
at ClientHandshake.handshakeInit (C:\Users\siroc\repositories\sphinxql\node_modules\mysql2\lib\commands\client_handshake.js:92:40)
at ClientHandshake.execute (C:\Users\siroc\repositories\sphinxql\node_modules\mysql2\lib\commands\command.js:39:22)
at Connection.handlePacket (C:\Users\siroc\repositories\sphinxql\node_modules\mysql2\lib\connection.js:449:32)
at PacketParser.Connection.packetParser.p [as onPacket] (C:\Users\siroc\repositories\sphinxql\node_modules\mysql2\lib\connection.js:72:12)
at PacketParser.executeStart (C:\Users\siroc\repositories\sphinxql\node_modules\mysql2\lib\packet_parser.js:75:16)
If you want to see the project with all updated (except the mysql2 package) to replicate the problem use https://github.com/SiroDiaz/sphinxql. Note that it is under develop branch. Just try to update mysql2 to latest version(1.7.0), start Manticore search 3.1.0 and run jest tests.
Start Manticore search daemon:
cd __tests__
searchd --config sphinx.conf
Metadata
Metadata
Assignees
Labels
No labels