Struggling to get a new Eleventy website up and running locally on Windows. Even though the codebase works fine on others' machines, I'm facing an issue with a 'missing' CSS file preventing me from launching the site.
[4] `TemplateWriterWriteError` was thrown
[4] > (./src/_includes/layouts/about.html)
[4] Error: template not found: css/critical.css
Interestingly, I can find the css/critical.css file in my output dist folder.
I'm unsure where the problem originates, but the first thing that caught my eye in VSCode is that the requires(...'gulp-clean-css')
line has three dots indicating no declaration for the module, with the package's index file implicitly having an 'any' type.
This leads me to believe that this could potentially be related as the gulp-clean-css package is used in generating the supposedly missing critical.css file.
After some research, it seems like this may be a TypeScript issue with a simple solution.
Solution: Simply edit your TypeScript Config file (tsconfig.json) and add a new key value pair as:
"noImplicitAny": false
But there's no specific direction on where to place the tsconfig file. Should it be in the Eleventy root folder? Or within the package?
Additionally, what other configurations should accompany that specific line? For example, I came across this sample file, which might suffice:
{
"compilerOptions": {
"module": "commonjs",
"esModuleInterop": true,
"target": "es6",
"moduleResolution": "node",
"sourceMap": true,
"outDir": "dist"
},
"lib": ["es2015"]
}
It's possible that I'm chasing a false lead here. If anyone has any guidance on resolving this issue, I would greatly appreciate it!