Trying to locally run a new Eleventy website on Windows. The same codebase works on other folks' computers, yet I can't launch it due to a 'missing' CSS file.
[4] `TemplateWriterWriteError` was thrown
[4] > (./src/_includes/layouts/about.html)
[4] Error: template not found: css/critical.css
Though weirdly, I can see the css/critical.css file in my output dist folder.
Not much idea where the problem starts, but first thing I notice in my VSCode is the requires(...'gulp-clean-css')
has three dots (shown in that code via '...') that when hovered suggest there's no declaration found for the module, and the package's index file implicitly has an 'any' type.
This 'might' have potential, because the gulp-clean-css package is used in producing the allegedly missing critical.css file.
Bit of reading suggests that's a TypeScript issue with an easy fix.
Solution: All you have to do is edit your TypeScript Config file (tsconfig.json) and add a new key value pair as:
"noImplicitAny": false
But there's no detail on where to put that tsconfig file. Does it go in the Eleventy root folder? Or in the package?
Also, what else is meant to go in with that line? Eg. I found this example file, maybe its sufficient:
{
"compilerOptions": {
"module": "commonjs",
"esModuleInterop": true,
"target": "es6",
"moduleResolution": "node",
"sourceMap": true,
"outDir": "dist"
},
"lib": ["es2015"]
}
Of course, its possible that here I'm following a red herring. But if anyone has any advice on how to solve this, many thanks in advance !