cuttle icon indicating copy to clipboard operation
cuttle copied to clipboard

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

Open seriouslysean opened this issue 1 year ago • 4 comments

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

seriouslysean avatar Mar 12 '24 14:03 seriouslysean

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

Posoroko avatar Mar 30 '24 10:03 Posoroko

@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?

seriouslysean avatar Mar 30 '24 11:03 seriouslysean

@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

Posoroko avatar Mar 30 '24 12:03 Posoroko

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.

seriouslysean avatar Mar 30 '24 15:03 seriouslysean