-
Notifications
You must be signed in to change notification settings - Fork 326
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
fix: generate code missing template on development runtime #965
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,9 @@ export default defineConfig((configEnv) => { | |
publicDir: path.resolve(__dirname, './public'), | ||
server: { | ||
port: 8090 | ||
}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Based on the search results, I found that port 8090 is configured in two vite config files:
Both files use port 8090 for their development servers. Since these are separate applications (designer and preview), they cannot run simultaneously on the same port. This could lead to port conflicts. Port 8090 is already in use by multiple applications. Please choose a different port or ensure only one application uses this port at a time.
🔗 Analysis chainConfirm that port 8090 is available. Changing the server port to 8090 can be fine, but ensure there's no port conflict on the target environment, especially if multiple local services run concurrently. Here is a script to check references in the codebase for "port" settings, in case there are multiple conflicts: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Searching for any other `server.port` usage in the repository
rg -A 3 $'server:\\s*{\\s*port:'
Length of output: 144 Script: #!/bin/bash
# Let's try a different approach to search for port configurations
rg -i "port.*=.*8090"
# Also search for other port configurations in the codebase
rg -i "port.*=.*\d{4}"
# Search specifically in vite config files
fd "vite.config" --exec cat {}
Length of output: 66288 Script: #!/bin/bash
# Let's try a more specific search for port configurations in vite config files
rg -i "port.*=.*8090" --type js
# Also search for any port configurations in vite files
rg -i "port.*=" --type js "vite.config"
# Find and show content of vite config files
fd "vite.config.js" --exec cat {}
Length of output: 66919 |
||
define: { | ||
process: {} | ||
Comment on lines
+19
to
+20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Define Based on the search results, there are several instances where
To prevent potential runtime errors, you should explicitly define define: {
'process.env': {} // or include specific env variables needed
} 🔗 Analysis chainCheck usage of the Declaring an empty Here is a script to see if 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Searching for references to `process.env` in the repository
rg -A 3 'process\.env'
Length of output: 2516 |
||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Empty
process
object is insufficient,process.env
is neededBased on the search results, the codebase shows multiple usages of
process.env
, particularly:process.env.NODE_ENV
process.env.VUE_APP_UI_LIB_FULL_STYLE_FILE_URL
The empty
process
object in the Vite config should be updated to includeprocess.env
to support these environment-dependent features.Example fix:
🔗 Analysis chain
Assert that the empty
process
fits your needs.An empty
process
object helps avoid build-time errors if certain packages expect a Node-like environment. If your app specifically relies on environment variables, defineprocess.env
or use alternative stubs instead.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 8527