Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
seriouslysean opened this issue Mar 12, 2024 · 4 comments
Open

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

seriouslysean opened this issue Mar 12, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@seriouslysean
Copy link
Collaborator

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 seriouslysean added the bug Something isn't working label Mar 12, 2024
@Posoroko
Copy link
Contributor

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

@seriouslysean
Copy link
Collaborator Author

@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
Copy link
Contributor

@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
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants