Open jxs7754 opened 1 year ago
Do you have a reproduction where this causes an issue?
Do you mean ''[''.length - 1] === undefined
? IMO this won't cause a crash.
hi, while I'm unable to provide a reproduction of this error, It's actually possible to get a crash, when code is undefined - this is what happened to me, using @vitejs/plugin-legacy
TypeError: Cannot read properties of undefined (reading 'length')
at transformChunk (file:///Users/rsanchez/azumo/spinwheel/pricechopper-rewards-platform/node_modules/.pnpm/rollup@4.17.2/node_modules/rollup/dist/es/shared/node-entry.js:17955:31)
at async file:///Users/rsanchez/azumo/spinwheel/pricechopper-rewards-platform/node_modules/.pnpm/rollup@4.17.2/node_modules/rollup/dist/es/shared/node-entry.js:18013:17
at async Promise.all (index 4)
at async transformChunksAndGenerateContentHashes (file:///Users/rsanchez/azumo/spinwheel/pricechopper-rewards-platform/node_modules/.pnpm/rollup@4.17.2/node_modules/rollup/dist/es/shared/node-entry.js:18008:5)
at async renderChunks (file:///Users/rsanchez/azumo/spinwheel/pricechopper-rewards-platform/node_modules/.pnpm/rollup@4.17.2/node_modules/rollup/dist/es/shared/node-entry.js:17916:137)
at async Bundle.generate (file:///Users/rsanchez/azumo/spinwheel/pricechopper-rewards-platform/node_modules/.pnpm/rollup@4.17.2/node_modules/rollup/dist/es/shared/node-entry.js:18150:13)
at async file:///Users/rsanchez/azumo/spinwheel/pricechopper-rewards-platform/node_modules/.pnpm/rollup@4.17.2/node_modules/rollup/dist/es/shared/node-entry.js:20697:27
at async catchUnfinishedHookActions (file:///Users/rsanchez/azumo/spinwheel/pricechopper-rewards-platform/node_modules/.pnpm/rollup@4.17.2/node_modules/rollup/dist/es/shared/node-entry.js:20124:16)
at async build (file:///Users/rsanchez/azumo/spinwheel/pricechopper-rewards-platform/node_modules/.pnpm/vite@5.2.9_@types+node@18.19.31_sass@1.75.0_terser@5.30.3/node_modules/vite/dist/node/chunks/dep-_QLjGPdL.js:67458:22)
at async viteBuildExecutor (/Users/rsanchez/azumo/spinwheel/pricechopper-rewards-platform/node_modules/.pnpm/@nx+vite@19.0.2_@swc-node+register@1.8.0_@swc+core@1.3.107_@types+node@18.19.31_nx@19.0.2_typ_tg2xsbhfpy5khdodoi6yr5b4oy/node_modules/@nx/vite/src/executors/build/build.impl.js:63:29)
at async getLastValueFromAsyncIterableIterator (/Users/rsanchez/azumo/spinwheel/pricechopper-rewards-platform/node_modules/.pnpm/nx@19.0.2_@swc-node+register@1.8.0_@swc+core@1.3.107/node_modules/nx/src/utils/async-iterator.js:15:19)
at async iteratorToProcessStatusCode (/Users/rsanchez/azumo/spinwheel/pricechopper-rewards-platform/node_modules/.pnpm/nx@19.0.2_@swc-node+register@1.8.0_@swc+core@1.3.107/node_modules/nx/src/command-line/run/run.js:43:29)
at async handleErrors (/Users/rsanchez/azumo/spinwheel/pricechopper-rewards-platform/node_modules/.pnpm/nx@19.0.2_@swc-node+register@1.8.0_@swc+core@1.3.107/node_modules/nx/src/utils/params.js:10:16)
at async process.<anonymous> (/Users/rsanchez/azumo/spinwheel/pricechopper-rewards-platform/node_modules/.pnpm/nx@19.0.2_@swc-node+register@1.8.0_@swc+core@1.3.107/node_modules/nx/bin/run-executor.js:59:28)```
https://github.com/rollup/rollup/blame/da74c5929b66d45e1bbd4400899a8be9a3e25d33/src/utils/renderChunks.ts#L142