fix
This commit is contained in:
@@ -85,7 +85,7 @@ The default deploy flow is:
|
||||
|
||||
```sh
|
||||
git pull --ff-only
|
||||
npm install --production=false --include=dev --omit=optional
|
||||
npm install --production=false --include=dev --include=optional
|
||||
npm run build
|
||||
pm2 reload tssbot-web --update-env
|
||||
```
|
||||
|
||||
+12
-3
@@ -98,11 +98,11 @@ function run(command, args, options = {}) {
|
||||
}
|
||||
|
||||
async function ensureBuildDependencies() {
|
||||
await run('npm', ['install', '--production=false', '--include=dev', '--omit=optional'], {
|
||||
await run('npm', ['install', '--production=false', '--include=dev', '--include=optional'], {
|
||||
env: {
|
||||
NODE_ENV: 'development',
|
||||
npm_config_include: 'dev',
|
||||
npm_config_omit: 'optional',
|
||||
npm_config_include: 'dev,optional',
|
||||
npm_config_omit: '',
|
||||
npm_config_production: 'false',
|
||||
},
|
||||
})
|
||||
@@ -112,6 +112,15 @@ async function ensureBuildDependencies() {
|
||||
} catch {
|
||||
throw new Error('@vitejs/plugin-react is missing after npm install; dev dependencies were not installed')
|
||||
}
|
||||
|
||||
if (process.platform === 'linux' && process.arch === 'x64') {
|
||||
const libc = process.report?.getReport?.().header?.glibcVersionRuntime ? 'gnu' : 'musl'
|
||||
try {
|
||||
require.resolve(`@rollup/rollup-linux-x64-${libc}`)
|
||||
} catch {
|
||||
throw new Error(`@rollup/rollup-linux-x64-${libc} is missing after npm install; optional dependencies were not installed`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function postDiscordWebhook(payload) {
|
||||
|
||||
Reference in New Issue
Block a user