Can't find stylesheet to import error during site build with eleventy

Currently having issues with netlify on build where upon sass importing the bootstrap sheets in app.scss, it fails and stops. I’ve tried multiple syntax for the import (with the tilde, no node_modules path, with the node_modules path), and while "../node_modules/bootstrap/scss/_functions"; works on local for example, it errors the same on the netlify build.
I haven’t been able to even have the website up running, hence why the lack of an url.

This is the error (where I tried to see and match netlify’s path for node)

Problem writing Eleventy templates:
9:34:12 PM: [11ty] 1. Having trouble rendering scss template ./src/assets/sass/app.scss (via TemplateContentRenderError)
9:34:12 PM: [11ty] 2. Having trouble compiling template ./src/assets/sass/app.scss (via TemplateContentCompileError)
9:34:12 PM: [11ty] 3. Can’t find stylesheet to import.
9:34:12 PM: [11ty] ╷
9:34:12 PM: [11ty] 7 │ @import “../../../bootstrap/scss/_variables”;
9:34:12 PM: [11ty] │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9:34:12 PM: [11ty] ╵
9:34:12 PM: [11ty] - 7:9 root stylesheet
9:34:12 PM: [11ty]
9:34:12 PM: [11ty] Original error stack trace: Error: Can’t find stylesheet to import.
9:34:12 PM: [11ty] ╷
9:34:12 PM: [11ty] 7 │ @import “../../../bootstrap/scss/_variables”;
9:34:12 PM: [11ty] │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9:34:12 PM: [11ty] ╵
9:34:12 PM: [11ty] - 7:9 root stylesheet
9:34:12 PM: [11ty] at Object.wrapException (/opt/build/repo/node_modules/.pnpm/sass@1.101.0/node_modules/sass/sass.dart.js:2337:47)
9:34:12 PM: [11ty] at _EvaluateVisitor1._evaluate0$_loadStylesheet$4$baseUrl$forImport (/opt/build/repo/node_modules/.pnpm/sass@1.101.0/node_modules/sass/sass.dart.js:105231:19)
9:34:12 PM: [11ty] at _EvaluateVisitor1._evaluate0$_loadStylesheet$3$forImport (/opt/build/repo/node_modules/.pnpm/sass@1.101.0/node_modules/sass/sass.dart.js:105253:19)
9:34:12 PM: [11ty] at _EvaluateVisitor__visitDynamicImport_closure1.call$0 (/opt/build/repo/node_modules/.pnpm/sass@1.101.0/node_modules/sass/sass.dart.js:107758:17)
9:34:12 PM: [11ty] at _EvaluateVisitor1._evaluate0$_withStackFrame$1$3 (/opt/build/repo/node_modules/.pnpm/sass@1.101.0/node_modules/sass/sass.dart.js:106879:25)
9:34:12 PM: [11ty] at _EvaluateVisitor1._evaluate0$_withStackFrame$3 (/opt/build/repo/node_modules/.pnpm/sass@1.101.0/node_modules/sass/sass.dart.js:106885:19)
9:34:12 PM: [11ty] at _EvaluateVisitor1._evaluate0$_visitDynamicImport$1 (/opt/build/repo/node_modules/.pnpm/sass@1.101.0/node_modules/sass/sass.dart.js:105172:19)
9:34:12 PM: [11ty] at _EvaluateVisitor1.visitImportRule$1 (/opt/build/repo/node_modules/.pnpm/sass@1.101.0/node_modules/sass/sass.dart.js:105145:17)
9:34:12 PM: [11ty] at ImportRule0.accept$1$1 (/opt/build/repo/node_modules/.pnpm/sass@1.101.0/node_modules/sass/sass.dart.js:111723:22)
9:34:12 PM: [11ty] at ImportRule0.accept$1 (/opt/build/repo/node_modules/.pnpm/sass@1.101.0/node_modules/sass/sass.dart.js:111726:19)

looks like the import path is relative to the scss file itself, not the repo root. from src/assets/sass/app.scss, ../../../bootstrap/scss/_variables resolves to /bootstrap/scss/_variables, and node_modules isnt in that path at all, so sass cant find it anywhere. ../node_modules/… has the same problem: from that folder it points at src/assets/node_modules, which doesnt exist.

guessing your local machine has something slightly different going on (stale build output, a different entry point, whatever), but id stop chasing that and just fix the import instead.

import it as “bootstrap/scss/functions” and add node_modules to the sass load paths in your eleventy config. that way it resolves the same on your machine and on netlify. also double check bootstrap is actually listed in dependencies in package.json, since the build log shows pnpm and pnpm wont hoist it to the top level of node_modules unless its a direct dep.