I have the same issue, the only way that I found to make my local packages work with NextJS is by import packed package.
npm pack
on the package to export, this create a package-version.tgz
file.npm install '/path/to/package-version.tgz'
"@my-libs/a-lib": "file:../../../a-lib-1.0.0.tgz",
then run npm install