I can't seem to clear this error. Can anyone help? I deleted the duplicate files but nothing.
Error: Duplicated files or mocks. Please check the console for more info
at setModule (/Users/xavier/Documents/GitHub/Newville/node_modules/jest-haste-map/build/index.js:576:17)
at workerReply (/Users/xavier/Documents/GitHub/Newville/node_modules/jest-haste-map/build/index.js:647:9)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.all (index 2077)
at /Users/xavier/Documents/GitHub/Newville/node_modules/jest-haste-map/build/index.js:459:22
at Function.load (/Users/xavier/Documents/GitHub/Newville/node_modules/metro/src/node-haste/DependencyGraph.js:86:36)
at Bundler.ready (/Users/xavier/Documents/GitHub/Newville/node_modules/metro/src/Bundler.js:61:5)
at IncrementalBundler.ready (/Users/xavier/Documents/GitHub/Newville/node_modules/metro/src/IncrementalBundler.js:309:5)
at Server.ready (/Users/xavier/Documents/GitHub/Newville/node_modules/metro/src/Server.js:1156:5)
Related
I have 230 tests and on my own machine its passed always, but on the github in github actions, tests is often falling with econnreset problem:
[0] 1) App [0] Get full search result [0] "before all" hook for "should search full list of collabraotions and users": [0] Error: connect ECONNRESET 127.0.0.1:36421 [0] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16)
And I don't know how fix this, and I will be happy if someone tell me reason and how fix it.
My througts was, that it caused by wrong ports, but after change ports to hardcode 3000, problem not left
UPDATE: node version is 16.14 on my own computer and in workflow
I have used other versions of JHipster but that one in my mac is not working fine, I am trying to generate a simple gateway (no entities yet), and after executing:
$jhipster
Filling the application metadata, I just got:
ERROR! Callback called multiple times
Error [ERR_MULTIPLE_CALLBACK]: Callback called multiple times
at NodeError (node:internal/errors:371:5)
at onFinish (node:internal/streams/writable:667:37)
at processTicksAndRejections (node:internal/process/task_queues:82:21)
at runNextTicks (node:internal/process/task_queues:65:3)
at listOnTimeout (node:internal/timers:526:9)
at processTimers (node:internal/timers:500:7) {
code: 'ERR_MULTIPLE_CALLBACK'
So, according to #MattRaible and #GaelMariou, when having the ERROR! Callback called multiple times when generating JHipter applications or entities, you should verify the Node JS version. That version is provided in pom.xml or build.gradle, however, I never found a reference of node version in pom.xml (I use maven).
It is not clear where to get the exact version, nevertheless there is this article that states the same problem using node.js version bigger than 14: https://github.com/jhipster/generator-jhipster/issues/16744.
Meaning you should keep your node.js in version 14 until they solve that issue. I changed to v14.18.1, and now it is working sharp.
I've been experiencing this issue for a while now; my bot was working perfectly fine about a week ago.
I'm running the latest NodeJS (15.5.1) and Discord.JS (12.5.1) and Erela.js (2.3.1)
I've tried reinstalling all of them with still the return issue (below),
I've asked more than 10 times in the Official Discord.JS server with no avail,
I've asked in the Erela.js Official Discord (awaiting reply)
I'm completely out of ideas as to why I am getting this issue, theres literally nothing with my code as it worked fine, and was running on the latest modules (described above erela.js & discord.js)
Now all of a sudden approx. a week ago now, this issue appeared and I've been trying to troubleshoot it ever since discovering the issue.
I have provided the full stacktrace below along with link to the exact file from discord.js src:
Discord.JS Repo - VoiceStateUpdate.js
[2:57:49 PM] ERROR [Uncaught Exception]: TypeError: client.voice.onVoiceStateUpdate is not a function
at VoiceStateUpdate.handle
(/home/thewarden/node_modules/discord.js/src/client/actions/VoiceStateUpdate.js:31:22)
at Object.module.exports [as VOICE_STATE_UPDATE]
(/home/thewarden/node_modules/discord.js/src/client/websocket/handlers/VOICE_STATE_UPDATE.js:4:35)
at WebSocketManager.handlePacket
(/home/thewarden/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
at WebSocketShard.onPacket
(/home/thewarden/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
at WebSocketShard.onMessage
(/home/thewarden/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
at WebSocket.onMessage (/home/thewarden/node_modules/ws/lib/event-target.js:132:16)
at WebSocket.emit (node:events:376:20)
at Receiver.receiverOnMessage (/home/thewarden/node_modules/ws/lib/websocket.js:825:20)
at Receiver.emit (node:events:376:20)
at Receiver.dataMessage (/home/thewarden/node_modules/ws/lib/receiver.js:437:14)
at Receiver.getData (/home/thewarden/node_modules/ws/lib/receiver.js:367:17)
at Receiver.startLoop (/home/thewarden/node_modules/ws/lib/receiver.js:143:22)
at Receiver._write (/home/thewarden/node_modules/ws/lib/receiver.js:78:10)
at writeOrBuffer (node:internal/streams/writable:395:12)
at Receiver.Writable.write (node:internal/streams/writable:340:10)
at TLSSocket.socketOnData (/home/thewarden/node_modules/ws/lib/websocket.js:900:35)
voiceStateUpdate is an event. To run it, you'll need to use the client.on()function that calls an event, with the correct callback.
Therefore, your code should look like the following:
client.on('voiceStateUpdate', oldState, newState => {
// code here
})
To learn more about the voiceStateUpdate event and its callback: https://discord.js.org/#/docs/main/stable/class/Client?scrollTo=e-voiceStateUpdate
I'm working in NodeJs and when trying to write file as .pdf with the help of 'fs' npm package I got some error and even pdf is not generating. I need help to jump out of this, issue is
events.js:167
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at WriteWrap.afterWrite [as oncomplete] (net.js:833:14)
Emitted 'error' event at:
at onwriteError (_stream_writable.js:431:12)
at onwrite (_stream_writable.js:456:5)
at _destroy (internal/streams/destroy.js:40:7)
at Socket._destroy (net.js:603:3)
at Socket.destroy (internal/streams/destroy.js:32:8)
at WriteWrap.afterWrite [as oncomplete] (net.js:835:10)
Code regarding this error:
let doc = await wkhtmltopdf(options, xxxx);
let file = await doc.stdout.pipe(fs.createWriteStream(`${__dirname}/${id}_init.pdf`));
Thanks in anticipation!!
I have tried re-installing fs package, changing the ports but no improvement
I think the issue may be bcz of wkhtmltopdf package too(I'm using Mac)
I suggest you make the following changes, this is working very nicely for me:
// Set url and options to whatever you wish
let doc = wkhtmltopdf(url, options);
let file = doc.pipe(fs.createWriteStream(`${__dirname}/${id}_init.pdf`));
We can't use await on either call, since neither wkhtmltopdf nor doc.pipe return promises.
You can also try writing directly to file, skipping the stream, e.g.
wkhtmltopdf('http://google.com/', { output: 'out.pdf' });
All of a sudden this error appeared when I did npm run start.
The project is built with ant-design pro.
The sad part is that it doesn't tell me where the error is.
Could you help me find the error or to fix it.
The build just gets stuck at 91% and then I get the error message.
Here's the error:
build [================== ] 91%(node:6978) UnhandledPromiseRejectionWarning: RangeError: Invalid string length
at formatError (/home/teks/trips/may26th/smarttrips_react/node_modules/webpack/lib/Stats.js:223:30)
at Array.map (<anonymous>)
at Stats.toJson (/home/teks/trips/may26th/smarttrips_react/node_modules/webpack/lib/Stats.js:230:31)
at Compiler.<anonymous> (/home/teks/trips/may26th/smarttrips_react/node_modules/html-webpack-plugin/index.js:68:44)
at Compiler.applyPluginsAsyncSeries (/home/teks/trips/may26th/smarttrips_react/node_modules/tapable/lib/Tapable.js:206:13)
at Compiler.emitAssets (/home/teks/trips/may26th/smarttrips_react/node_modules/webpack/lib/Compiler.js:354:8)
at onCompiled (/home/teks/trips/may26th/smarttrips_react/node_modules/webpack/lib/Compiler.js:58:19)
at applyPluginsAsync.err (/home/teks/trips/may26th/smarttrips_react/node_modules/webpack/lib/Compiler.js:510:14)
at next (/home/teks/trips/may26th/smarttrips_react/node_modules/tapable/lib/Tapable.js:202:11)
at Compiler.<anonymous> (/home/teks/trips/may26th/smarttrips_react/node_modules/webpack/lib/CachePlugin.js:78:5)
at next (/home/teks/trips/may26th/smarttrips_react/node_modules/tapable/lib/Tapable.js:204:14)
at /home/teks/trips/may26th/smarttrips_react/node_modules/hard-source-webpack-plugin/index.js:2075:7
at <anonymous>
(node:6978) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:6978) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
EDIT : I also updated my npm to ver 6 but still get the same error message. please advise.
Well, I had been searching and now I found an issue posted which helped me out.
Basically, adding this code to my package.json is what helped me out.
"start": "HARD_SOURCE=none npm run _start", "_start": "cross-env ESLINT=none roadhog dev",
I couldnt understand much more of why as it was written in chinese,
Anyways, here's the link to the github issue as it may help some of you understand what was wrong.
antdesign github issue fixed here
It might be coz the localhost is not defined with the required syntax in the "hosts" file of the system.
The file can be located #:
linux
etc/hosts
Windows
c:\ **Windows** \System32\Drivers\ **etc** \ **hosts**
i.e. file has some wrong input.
So, Try replacing everything in that file with the text below as this is the default text that was always there in hosts file when it worked fine:
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost