squoosh: Error: Could not load css
src/static-build/index.tsx → .tmp/build...
[!] (plugin css) Error: Could not load css:/squoosh-dev/src/shared/prerendered-app/colors.css (imported by initialCss): Cannot find \squoosh-dev\src\shared\prerendered-app\colors.css in pathToResult
Error: Could not load css:/squoosh-dev/src/shared/prerendered-app/colors.css (imported by initialCss): Cannot find \squoosh-dev\src\shared\prerendered-app\colors.css in pathToResult
at Object.load (F:\squoosh-dev\rollup.config.js:552:17)
at F:\squoosh-dev\node_modules\rollup\dist\shared\rollup.js:18971:25
windows 10 x64 npm 16
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 5
- Comments: 17
请切换到其他版本的nodejs来尝试构建 Please switch to a different version of nodejs to try building it
such as nodejs 14
To anyone wanting to get it working on Windows on more recent versions of Node.js, these are the steps I’ve taken on commit https://github.com/GoogleChromeLabs/squoosh/commit/d87eff7645c151c2f4365c2515c71f4e56ed71ca (latest at the time of writing) to get it working:
lib\css-plugin.jsand go to line 163.constwith aletto allow modification:Make sure to replace
CwithDor whatever disk that project is running on.npm run buildTo get it running locally, I had to take these steps, not sure if they’re really required:
servescript to use the./buildfolder instead of.tmp/build/static:devscript:npm run servei have the same problem
same problem. And I solve it by use node version of v14