error and problems after upgrading quasar - javascript

fellow devs,
I have a quasar project that I have recently (stupidly) upgraded to the latest version to test it with vue 3. unfortunately my app does not launch and I get the following
(node:7976) UnhandledPromiseRejectionWarning: TypeError: Merging undefined is not supported
index.js:63 mergeWithOptions
[StayFit]/[webpack-merge]/dist/index.js:63:19
index.js:52 merge
[StayFit]/[webpack-merge]/dist/index.js:52:35
quasar-conf-file.js:392 QuasarConfFile.compile
[StayFit]/[#quasar]/app/lib/quasar-conf-file.js:392:29
task_queues.js:95 processTicksAndRejections
internal/process/task_queues.js:95:5
quasar-dev:237 async goLive
[StayFit]/[#quasar]/app/bin/quasar-dev:237:3
(Use node --trace-warnings ... to show where the warning was created)
(node:7976) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:7976) [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.
I have tried to roll back quasar version or uninstall it and reinstall a certain version but still the same issue.
any solution there?

Related

Unable to get local issuer certificate in node js

I am new to the node js.I am getting this error while running my node js code in local. Please help me in this.
(node:7532) UnhandledPromiseRejectionWarning: Error: unable to get local issuer certificate
at TLSSocket.onConnectSecure (_tls_wrap.js:1048:34)
at TLSSocket.emit (events.js:182:13)
at TLSSocket._finishInit (_tls_wrap.js:628:8)
(node:7532) 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:7532) [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.
I tried some of the available solution on the internet, but so far any of them are working.
This are the things I have tried.
npm set strict-ssl=false
npm config set strict-ssl false
export NODE_TLS_REJECT_UNAUTHORIZED=0

discord.js message.startThread() doesnt work

I found this example for creating threads in the official discord.js guide, but it doesn't work...
const thread = await message.startThread({
name: 'food-talk',
autoArchiveDuration: 60,
reason: 'Needed a separate thread for food',
});
It returns message.startThread is not a function
What is the correct function to do this?
Full Error:
(node:1727) UnhandledPromiseRejectionWarning: TypeError: msg.startThread is not a function
(node:1727) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1727) [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.
I think your problem is already solved but here is all you need to do for people who just found this post on google.
npm i discord.js#latest

Discord.js Missing Access On Slash Commands

There are other problems like this but none of them have a solution that works for me. I want to use slash commands with my discord bot I have all the scopes including application.commands but it still gives me this when I try to execute my code:
(node:1648) UnhandledPromiseRejectionWarning: DiscordAPIError: Missing Access
at RequestHandler.execute (C:\Users\camer\node_modules\discord.js\src\rest\RequestHandler.js:154:13)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async RequestHandler.push (C:\Users\camer\node_modules\discord.js\src\rest\RequestHandler.js:39:14)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1648) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1648) [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.
I was stupid I forgot to put my guild id in quotes!

How to fix 'Error: ENOENT' in node.js if the file and the requirement was deleted?

I recently changed the event handler dor my discord bot and I get this error.
I edited all the files so I don`t get any error but now I get this error and it does not say where the error takes place
(node:9356) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, scandir 'C:\Users\user1\Documents\GitHub\MYSQL_TEST\utils\events'
(node:9356) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:9356) [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.```

Node generate image from DOM

I want to generate image or blob from DOM element on nodejs. Since node doesn't have DOM to handle I'm creating one from JSDOM. My initial plan was to use dom-to-image library but it spitting errors:
(node:10384) UnhandledPromiseRejectionWarning: SyntaxError: The string did not match the expected pattern.
at XMLHttpRequest.open (/home/webdev/servers/web/node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js:480:15)
at about:blank:2:5649
at new Promise (<anonymous>)
at j (about:blank:2:5177)
(node:10384) 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: 3)
(node:10384) [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.
Second plan was to generate canvas by: html2canvas and save it as blob. That also failed by generating:
Error: Not implemented: window.scrollTo
at module.exports (/home/webdev/servers/web/node_modules/jsdom/lib/jsdom/browser/not-implemented.js:9:17)
at /home/webdev/servers/web/node_modules/jsdom/lib/jsdom/browser/Window.js:579:7
at about:blank:6:156607 undefined
Error: Not implemented: HTMLCanvasElement.prototype.getContext (without installing the canvas npm package)
at module.exports (/home/webdev/servers/web/node_modules/jsdom/lib/jsdom/browser/not-implemented.js:9:17)
at HTMLCanvasElementImpl.getContext (/home/webdev/servers/web/node_modules/jsdom/lib/jsdom/living/nodes/HTMLCanvasElement-impl.js:42:5)
at HTMLCanvasElement.getContext (/home/webdev/servers/web/node_modules/jsdom/lib/jsdom/living/generated/HTMLCanvasElement.js:41:47)
at A.value (about:blank:6:43814)
at new A (about:blank:6:134500)
at about:blank:6:63123 undefined
(node:11033) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'scale' of null
(node:11033) 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:11033) [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.
window.scrollTo can be overwritten but canvas is more tricky. There is all sorts of errors including canvas in JSDOM
Rolling fix for it:
https://github.com/jsdom/jsdom/pull/1964
Also I was thinking about using puppeteer as my Virtual DOM since it uses headless chrome but that seems overkill and also can generate errors because you're running separate browser. (I can't even run headless chrome because of errors mentioning no sandbox available).
My question is. Is it even possible to generate image from DOM on server side of nodejs framework?
Project information:
Node version - 10.11.0
Framework - nestjs latest
JSDOM - 12.2.0
html2image - 1.0.0-alpha.12
dom-to-image - 2.6.0

Categories