codey1416
08/14/2023, 9:13 PMyarn build
yarn run v1.22.19
$ rimraf dist && tsc && vite build
error during build:
RangeError: Maximum call stack size exceeded
at RegExp.exec (<anonymous>)
at file:///builds/developers/marti-admin-v2/node_modules/vite/dist/node/chunks/dep-3b8eb186.js:37117:54
at Array.reduce (<anonymous>)
at _interpolate (file:///builds/developers/marti-admin-v2/node_modules/vite/dist/node/chunks/dep-3b8eb186.js:37116:18)
at file:///builds/developers/marti-admin-v2/node_modules/vite/dist/node/chunks/dep-3b8eb186.js:37150:15
at Array.reduce (<anonymous>)
at _interpolate (file:///builds/developers/marti-admin-v2/node_modules/vite/dist/node/chunks/dep-3b8eb186.js:37116:18)
at file:///builds/developers/marti-admin-v2/node_modules/vite/dist/node/chunks/dep-3b8eb186.js:37150:15
at Array.reduce (<anonymous>)
at _interpolate (file:///builds/developers/marti-admin-v2/node_modules/vite/dist/node/chunks/dep-3b8eb186.js:37116:18)
error Command failed with exit code 1.rahul1
08/14/2023, 9:14 PMcodey1416
08/14/2023, 9:14 PMrahul1
08/14/2023, 9:14 PMrahul1
08/14/2023, 9:14 PMcodey1416
08/14/2023, 9:15 PM"scripts": {
"dev": "vite",
"build": "rimraf dist && tsc && vite build",
"lint:fix": "eslint ./src --ext .ts,.tsx --quiet --fix --ignore-path ./.gitignore",
"lint:format": "prettier --loglevel warn --write \"./**/*.{js,jsx,ts,tsx,css,md,json}\" ",
"lint": "concurrently yarn:lint:*",
"prettier": "prettier --write .",
"test": "jest",
"source-map-explorer": "source-map-explorer dist/**/*.js --gzip"
},codey1416
08/14/2023, 9:15 PMrahul1
08/14/2023, 9:15 PMcodey1416
08/14/2023, 9:15 PMrahul1
08/14/2023, 9:16 PMcodey1416
08/14/2023, 9:16 PMcodey1416
08/14/2023, 9:17 PMā¶ yarn build
yarn run v1.22.19
$ rimraf dist && tsc && vite build
vite v4.4.7 building for production...
ā 5366 modules transformed.
dist/index.html 0.90 kB ā gzip: 0.46 kB
dist/assets/index-9b7f1ec0.css 0.08 kB ā gzip: 0.09 kB
dist/assets/index-de8aaa20.js 929.60 kB ā gzip: 263.47 kB
(!) Some chunks are larger than 500 kBs after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
ā built in 10.49s
⨠Done in 18.16s.codey1416
08/14/2023, 9:34 PMrahul1
08/14/2023, 9:34 PMcodey1416
08/14/2023, 9:34 PMvariables:
NC: '\033[0m'
PURPLE: '\033[1;35m'
BLUE: '\033[1;34m'
GIT_DEPTH: 1
MEDPLUM_BASE_URL: $MEDPLUM_BASE_URL
MEDPLUM_CLIENT_ID: $MEDPLUM_CLIENT_ID
GOOGLE_CLIENT_ID: $GOOGLE_CLIENT_ID
RECAPTCHA_SITE_KEY: $RECAPTCHA_SITE_KEY
MEDPLUM_REGISTER_ENABLED: $MEDPLUM_REGISTER_ENABLED
image: node:18.7.0
stages:
- build
- test
- deploy
- review
- dast
- staging
- canary
- production
- incremental rollout 10%
- incremental rollout 25%
- incremental rollout 50%
- incremental rollout 100%
- performance
- cleanup
build:
stage: build
script:
- |
# block
echo -e "${PURPLE}--------------------------${NC}"
echo -e "${PURPLE}Building...${NC}"
echo -e "${PURPLE}--------------------------${NC}"
- rm -rf node_modules
- export NODE_OPTIONS="--max-old-space-size=8192"
- yarn config set network-timeout 300000
- yarn cache clean
- yarn install
- yarn build
- |
# block
echo -e "${PURPLE}--------------------------${NC}"
echo -e "${PURPLE}Building complete${NC}"
echo -e "${PURPLE}--------------------------${NC}"
test:
stage: test
script:
- |
# block
echo -e "${PURPLE}--------------------------${NC}"
echo -e "${PURPLE}Testing...${NC}"
echo -e "${PURPLE}--------------------------${NC}"
- export NODE_OPTIONS="--max-old-space-size=4096"
- yarn install
- yarn test
- |
# block
echo -e "${PURPLE}--------------------------${NC}"
echo -e "${PURPLE}Testing complete${NC}"
echo -e "${PURPLE}--------------------------${NC}"
sast:
stage: test
include:
- template: Jobs/SAST.gitlab-ci.yml
- template: Security/Secret-Detection.gitlab-ci.ymlcodey1416
08/14/2023, 9:35 PMrahul1
08/14/2023, 9:35 PMcodey1416
08/14/2023, 10:16 PMtsc command. If I change the build script to simply vite build it worksrahul1
08/14/2023, 10:31 PMrahul1
08/14/2023, 10:31 PMrahul1
08/14/2023, 10:45 PMrahul1
08/14/2023, 10:47 PMcodey1416
08/14/2023, 11:31 PMcodey1416
08/15/2023, 7:36 PMrahul1
08/15/2023, 9:02 PMrahul1
08/15/2023, 9:07 PMcodey1416
08/15/2023, 10:15 PM