Closed bemayr closed 3 years ago
First of all, thanks for this great project! 👏
When trying to include this project into a preact-cli based PWA, I got the following error:
Build failed! × ERROR ../node_modules/opencv-ts/src/opencv.js Module not found: Error: Can't resolve 'fs' in '.\node_modules\opencv-ts\src' @ ../node_modules/opencv-ts/src/opencv.js 8:1395-1408 8:8592374-8592387 @ ../node_modules/babel-loader/lib??ref--4!./routes/home/index.tsx @ ./routes/home/index.tsx @ ./components/app.tsx @ ./index.ts @ ../node_modules/preact-cli/lib/lib/entry.js
After a bit of searching for this error I stumbled upon https://github.com/tensorflow/tfjs/issues/1274, with a proposed fix of adding
"browser": { "fs": false }
to package.json. I tested it and it works, I am gonna open a PR in a minute. 👌
package.json
I hadn't tried bundling it with webpack yet so thanks for fixing that up in the PR :)
No problem at all, thanks for the really fast merging and publishing!! 🙏
First of all, thanks for this great project! 👏
When trying to include this project into a preact-cli based PWA, I got the following error:
After a bit of searching for this error I stumbled upon https://github.com/tensorflow/tfjs/issues/1274, with a proposed fix of adding
to
package.json
. I tested it and it works, I am gonna open a PR in a minute. 👌