And one thing I found is that if I replace below, the original error has disappeared but new error happened. I tried to replace like below because your official document says that it use “require” instead of “import”.
// before
import asana from "asana";
↓
// after
const asana = require("asana");
Then this new error happened as below.
Failed to compile
./node_modules/readline/readline.js:1:0
Module not found: Can't resolve 'fs'
Import trace for requested module:
./node_modules\asana\lib\auth\native_flow.js
./node_modules\asana\lib\auth\index.js
./node_modules\asana\index.js
./services\asanaService.tsx
./components\RadarChart.tsx
./pages\index.tsx
https://nextjs.org/docs/messages/module-not-found
Converting import
to require
itself was correct?? If so, should I struggle with this new error “Module not found: Can’t resolve ‘fs’”?