Repository navigation
Getting the message "Error the build was canceled" immediately after setup #390
Copy link
Copy link
Open
Description
Describe the bug
I get multiple errors on build - right after running npm create tutorial@latest both on windows and wsl
noam@Win11:~/try/t01/online-remult-tutorial$ npm run build
> online-remult-tutorial@0.0.1 build
> astro check && astro build
✘ [ERROR] The build was canceled
08:03:39 [types] Generated 1.41s
08:03:39 [check] Getting diagnostics for Astro files in /home/noam/try/t01/online-remult-tutorial...
Result (8 files):
- 0 errors
- 0 warnings
- 0 hints
✘ [ERROR] The build was canceled
08:03:45 [types] Generated 397ms
08:03:45 [build] output: "static"
08:03:45 [build] directory: /home/noam/try/t01/online-remult-tutorial/dist/
08:03:45 [build] Collecting build info...
08:03:45 [build] ✓ Completed in 1.45s.
08:03:45 [build] Building static entrypoints...
"Line" is imported from external module "@codemirror/state" but never used in "node_modules/@tutorialkit/react/dist/core/CodeMirrorEditor/indent.js", "node_modules/@tutorialkit/react/dist/core/CodeMirrorEditor/cm-theme.js" and "node_modules/@tutorialkit/react/dist/core/CodeMirrorEditor/index.js".
08:03:54 [vite] ✓ built in 9.67s
08:03:54 [build] ✓ Completed in 9.70s.
building client (vite)
08:03:59 [vite] ✓ 660 modules transformed.
08:03:59 [vite] dist/_astro/ec.8zarh.js 2.42 kB
08:03:59 [vite] dist/_astro/_slug_.p80qyc3e.css 13.36 kB │ gzip: 2.95 kB
08:03:59 [vite] dist/_astro/ec.lo7kk.css 20.38 kB │ gzip: 4.45 kB
08:03:59 [vite] dist/_astro/index.BDWyZ8Gq.js 0.29 kB │ gzip: 0.23 kB
08:03:59 [vite] dist/_astro/theme-store.BkTMmRgV.js 0.33 kB │ gzip: 0.22 kB
08:03:59 [vite] dist/_astro/is-preview-message.ZaUdCj-5.js 0.34 kB │ gzip: 0.25 kB
08:03:59 [vite] dist/_astro/_slug_.89f348d8.BKx4Q3iB.js 0.54 kB │ gzip: 0.26 kB
08:03:59 [vite] dist/_astro/index.DgoachrA.js 0.61 kB │ gzip: 0.35 kB
08:03:59 [vite] dist/_astro/ThemeSwitch.Cm_pIVTw.js 0.75 kB │ gzip: 0.43 kB
08:03:59 [vite] dist/_astro/LoginButton.Du2YHlwY.js 0.86 kB │ gzip: 0.52 kB
08:03:59 [vite] dist/_astro/jsx-runtime.B6N9iRLn.js 0.92 kB │ gzip: 0.58 kB
08:03:59 [vite] dist/_astro/client.DtQD7m52.js 1.75 kB │ gzip: 0.89 kB
08:03:59 [vite] dist/_astro/index.CU4-LTQY.js 2.28 kB │ gzip: 1.04 kB
08:03:59 [vite] dist/_astro/index.CT5_QPd6.js 2.62 kB │ gzip: 1.61 kB
08:03:59 [vite] dist/_astro/index.BpP6Y8ev.js 2.84 kB │ gzip: 1.61 kB
08:03:59 [vite] dist/_astro/index.C_x5C3a-.js 3.59 kB │ gzip: 1.82 kB
08:03:59 [vite] dist/_astro/index.DNi1g-pO.js 7.23 kB │ gzip: 2.91 kB
08:03:59 [vite] dist/_astro/OpenInStackblitzLink.D0lHZZvx.js 8.66 kB │ gzip: 3.70 kB
08:03:59 [vite] dist/_astro/hoisted.Df0Q_Fi1.js 19.12 kB │ gzip: 6.45 kB
08:03:59 [vite] dist/_astro/index.BK4Dft89.js 21.82 kB │ gzip: 9.85 kB
08:03:59 [vite] dist/_astro/index.BrCa7_dZ.js 23.13 kB │ gzip: 10.25 kB
08:03:59 [vite] dist/_astro/index.79P4xX5r.js 26.28 kB │ gzip: 8.77 kB
08:03:59 [vite] dist/_astro/index.CSw4d_b_.js 28.83 kB │ gzip: 11.76 kB
08:03:59 [vite] dist/_astro/index.Ck9yz3Ls.js 43.17 kB │ gzip: 14.92 kB
08:03:59 [vite] dist/_astro/webcontainer.BDuVMs12.js 43.90 kB │ gzip: 14.57 kB
08:03:59 [vite] dist/_astro/index.DCEevIE7.js 44.39 kB │ gzip: 14.85 kB
08:03:59 [vite] dist/_astro/index.Bg4pJIWr.js 85.66 kB │ gzip: 33.96 kB
08:03:59 [vite] dist/_astro/WorkspacePanelWrapper.ChrkZsQB.js 90.73 kB │ gzip: 31.27 kB
08:03:59 [vite] dist/_astro/NavWrapper.DJolMl14.js 123.56 kB │ gzip: 40.69 kB
08:03:59 [vite] dist/_astro/index.DDEQXXIH.js 133.95 kB │ gzip: 43.14 kB
08:03:59 [vite] dist/_astro/index.BW0d_TQw.js 294.97 kB │ gzip: 73.88 kB
08:03:59 [vite] dist/_astro/TerminalPanel.B8BSOEHI.js 501.20 kB │ gzip: 158.28 kB
08:03:59 [WARN] [vite]
(!) Some chunks are larger than 500 kB 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.
08:03:59 [vite] ✓ built in 4.99s
generating static routes
08:03:59 ▶ @tutorialkit/astro/dist/default/pages/index.astro
08:03:59 └─ /index.html (+14ms)
08:04:00 ▶ @tutorialkit/astro/dist/default/pages/[...slug].astro
08:04:00 └─ /1-basics/1-introduction/1-welcome/index.htmlTrying to compute an absolute file URL but Astro.site is not set.
(+27ms)
08:04:00 ✓ Completed in 314ms.
08:04:00 [@tutorialkit/astro] 1-basics-1-introduction-1-welcome-solution.json
08:04:00 [@tutorialkit/astro] 1-basics-1-introduction-1-welcome-files.json
08:04:00 [@tutorialkit/astro] template-default.json
08:04:00 [build] 2 page(s) built in 16.48s
08:04:00 [build] Complete!
noam@Win11:~/try/t01/online-remult-tutorial$Link to a StackBlitz project which shows the error
No response
Steps to reproduce
- Run 'npm create tutorialkit@latest`
- Run
npm run build
Get these errors
Expected behavior
Expected to look like there are no errors out of the box :)
Screenshots
No response
Platform
- TutorialKit version: [e.g. 1.0.1]
- OS: [e.g. macOS, Windows, Linux]
- Browser: [e.g. Chrome, Safari, Firefox]
- Version: [e.g. 91.1]
Additional context
The backstory is that I'm trying to upgrade a project created with 0.0.2 to latest and greatest and it doesn't build - and I'm trying to figure out what needs to be done, by comparing it to a project just after install.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
AriPerkkio commentedon Oct 23, 2024
I think errors have always been there. @Nemikolh any ideas where they come from?
It does build successfully. In the end of your log output there is:
noam-honig commentedon Oct 23, 2024
@AriPerkkio I see that it eventually produces a result - just thinking of it as a newbie - red error notices are scary :)
AriPerkkio commentedon Oct 23, 2024
I agree! We should get rid of these errors. The
buildcommand seems to runastro check && astro build. If you removeastro check, do the errors still appear?noam-honig commentedon Oct 23, 2024
@AriPerkkio not completely
noam-honig commentedon Oct 23, 2024
and it looks like this:

Draws attention
AriPerkkio commentedon Oct 23, 2024
There's a lot of similar reports on Astro about this too. We should go through their reports and look for solutions there 🤔
rmeena840 commentedon Oct 8, 2025
Has anyone found the solution for this?
TheJaredWilcurt commentedon Nov 3, 2025
I ran into this issue when running a Node script that needed to transform
.vuefiles and have access to@aliases in the Vite config.I'm using
vite-node --config vite.config.lib.js ./scripts/doThing.js.To stop the
X ERROR The build was canceledtext from appearing, I changed my code to the following:try { doThing(); + process.exit(0); } catch (error) { console.log(error); + process.exit(1); }Now when
doThingthrows, it is caught, the error is logged, and the CI stops. But if it does not have any issues, it just runs and exits. In both cases theX ERROR The build was canceledis no longer shown.I think I'm just killing the process early before the Vite life-cycle can complain that no build happened, but I don't care, scary red X is gone. If you are running many async tasks, you may need to await all of them finishing and move this
process.exitcode up higher so it is the very last thing to run, to avoid it ending early. See:AriPerkkio commentedon Nov 4, 2025
This is emitted by
esbuildand should likely be fixed in Astro. I don't think TutorialKit itself cancels the builds at any moment as it's just running Astro.https://github.com/evanw/esbuild/blob/fdece9513e3dda132a8bfefbd861624a70b89b0b/pkg/api/api_impl.go#L1510