cuttle-cards / cuttle

A two-player battle card game for all ages, built with nodejs, sailsjs, and vuejs
MIT License
144 stars 115 forks source link

[Bug]: Various warnings/errors thrown when building the app #892

Open seriouslysean opened 7 months ago

seriouslysean commented 7 months ago

Bug Summary

Various warnings/errors thrown when building the app

Detailed Description

The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
vite v5.0.3 building for production...
transforming (110) node_modules/vuetify/lib/components/VToolbar/index.mjs[@vue/compiler-sfc] :deep usage as a combinator has been deprecated. Use :deep(<inner-selector>) instead of :deep <inner-selector>.

[@vue/compiler-sfc] :deep usage as a combinator has been deprecated. Use :deep(<inner-selector>) instead of :deep <inner-selector>.

[@vue/compiler-sfc] :deep usage as a combinator has been deprecated. Use :deep(<inner-selector>) instead of :deep <inner-selector>.

[plugin:vite:resolve] Module "events" has been externalized for browser compatibility, imported by "/Users/kennedys1/Projects/cuttle/node_modules/@vue/devtools/build-node/hook.js". See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
[plugin:vite:resolve] Module "path" has been externalized for browser compatibility, imported by "/Users/kennedys1/Projects/cuttle/node_modules/@vue/devtools/build-node/hook.js". See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
[plugin:vite:resolve] Module "child_process" has been externalized for browser compatibility, imported by "/Users/kennedys1/Projects/cuttle/node_modules/@vue/devtools/build-node/backend.js". See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
[plugin:vite:resolve] Module "crypto" has been externalized for browser compatibility, imported by "/Users/kennedys1/Projects/cuttle/node_modules/@vue/devtools/build-node/backend.js". See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
[plugin:vite:resolve] Module "events" has been externalized for browser compatibility, imported by "/Users/kennedys1/Projects/cuttle/node_modules/@vue/devtools/build-node/backend.js". See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
[plugin:vite:resolve] Module "fs" has been externalized for browser compatibility, imported by "/Users/kennedys1/Projects/cuttle/node_modules/@vue/devtools/build-node/backend.js". See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
[plugin:vite:resolve] Module "http" has been externalized for browser compatibility, imported by "/Users/kennedys1/Projects/cuttle/node_modules/@vue/devtools/build-node/backend.js". See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
[plugin:vite:resolve] Module "https" has been externalized for browser compatibility, imported by "/Users/kennedys1/Projects/cuttle/node_modules/@vue/devtools/build-node/backend.js". See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
[plugin:vite:resolve] Module "net" has been externalized for browser compatibility, imported by "/Users/kennedys1/Projects/cuttle/node_modules/@vue/devtools/build-node/backend.js". See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
[plugin:vite:resolve] Module "os" has been externalized for browser compatibility, imported by "/Users/kennedys1/Projects/cuttle/node_modules/@vue/devtools/build-node/backend.js". See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
[plugin:vite:resolve] Module "path" has been externalized for browser compatibility, imported by "/Users/kennedys1/Projects/cuttle/node_modules/@vue/devtools/build-node/backend.js". See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
[plugin:vite:resolve] Module "stream" has been externalized for browser compatibility, imported by "/Users/kennedys1/Projects/cuttle/node_modules/@vue/devtools/build-node/backend.js". See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
[plugin:vite:resolve] Module "tls" has been externalized for browser compatibility, imported by "/Users/kennedys1/Projects/cuttle/node_modules/@vue/devtools/build-node/backend.js". See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
[plugin:vite:resolve] Module "tty" has been externalized for browser compatibility, imported by "/Users/kennedys1/Projects/cuttle/node_modules/@vue/devtools/build-node/backend.js". See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
[plugin:vite:resolve] Module "url" has been externalized for browser compatibility, imported by "/Users/kennedys1/Projects/cuttle/node_modules/@vue/devtools/build-node/backend.js". See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
[plugin:vite:resolve] Module "zlib" has been externalized for browser compatibility, imported by "/Users/kennedys1/Projects/cuttle/node_modules/@vue/devtools/build-node/backend.js". See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
node_modules/@vue/devtools/build-node/hook.js (1:85) Use of eval in "node_modules/@vue/devtools/build-node/hook.js" is strongly discouraged as it poses security risks and may cause issues with minification.
node_modules/@vue/devtools/build-node/hook.js (1:44560) Use of eval in "node_modules/@vue/devtools/build-node/hook.js" is strongly discouraged as it poses security risks and may cause issues with minification.
node_modules/@vue/devtools/build/hook.js (1:105) Use of eval in "node_modules/@vue/devtools/build/hook.js" is strongly discouraged as it poses security risks and may cause issues with minification.
node_modules/@vue/devtools/build/hook.js (1:44610) Use of eval in "node_modules/@vue/devtools/build/hook.js" is strongly discouraged as it poses security risks and may cause issues with minification.
node_modules/@vue/devtools/build-node/backend.js (8:8) Use of eval in "node_modules/@vue/devtools/build-node/backend.js" is strongly discouraged as it poses security risks and may cause issues with minification.

These need to be investigated and likeley solutioned/

Current Behavior

N/A

Expected Behavior

N/A

Steps to Reproduce

N/A

Posoroko commented 6 months ago

@itsalaidbacklife @seriouslysean Have you guys talked about this problem already : "The CJS build of Vite's Node API is deprecated." ?

seriouslysean commented 6 months ago

@Posoroko as far as I can tell it’s not breaking anything, and both @itsalaidbacklife and I have been preoccupied with a few other things so no real movement on it.

Did you have something in mind for it or any interest in looking in to it further or fixing it?

Posoroko commented 6 months ago

@seriouslysean I've looked into it this morning. I wouldn't mind creating a branch where I make the changes to update tu ems modules. I'm not sure I can pull it off, but it would would probably teach me a thing or two about a few things.

There are a few solutions...

Esm as default and oot in cjs when needed Cjs as default and opt in esm when needed Or Dynamically import vite if we need to stick with cjs

seriouslysean commented 6 months ago

I’d start here, https://vitejs.dev/guide/troubleshooting.

Dynamically import Vite: If you need to keep using CJS, you can dynamically import Vite using import('vite') instead. This requires your code to be written in an async context, but should still be manageable as Vite's API is mostly asynchronous.

Eventually @itsalaidbacklife and I want to move to TS so maybe we do that now and just allow normal JS files to be transpiled.