OpenNext: [unenv] fs.readFileSync is not implemented yet!
Running opennext build and preview yields the ff. error:
My
[unenv] fs.readFileSync is not implemented yet!
mnt/c/Users/X/Projects/X/.open-next/server-functions/default/handler.mjs
function loadManifest(path2, shouldCache = true, cache = sharedCache) {
const cached = shouldCache && cache.get(path2);
if (cached) {
return cached;
}
let manifest = JSON.parse((0, _fs.readFileSync)(
/* turbopackIgnore: true */
path2,
"utf8"
));
if (shouldCache) {
[unenv] fs.readFileSync is not implemented yet!
mnt/c/Users/X/Projects/X/.open-next/server-functions/default/handler.mjs
function loadManifest(path2, shouldCache = true, cache = sharedCache) {
const cached = shouldCache && cache.get(path2);
if (cached) {
return cached;
}
let manifest = JSON.parse((0, _fs.readFileSync)(
/* turbopackIgnore: true */
path2,
"utf8"
));
if (shouldCache) {
wrangler.jsonc
has nodejs_compat
flags already enabled:
{
"$schema": "node_modules/wrangler/config-schema.json",
"main": ".open-next/worker.js",
"name": "X",
"compatibility_date": "2024-12-30",
"compatibility_flags": ["nodejs_compat"],
"assets": {
"directory": ".open-next/assets",
"binding": "ASSETS",
},
"kv_namespaces": [
{
"binding": "NEXT_INC_CACHE_KV",
"id": "NEXT_CACHE_WORKERS_KV",
},
],
"r2_buckets": [
{
"binding": "NEXT_PUBLIC_R2_BUCKET",
"bucket_name": "NEXT_PUBLIC_R2_BUCKET",
},
],
"observability": {
"enabled": true,
},
{
"$schema": "node_modules/wrangler/config-schema.json",
"main": ".open-next/worker.js",
"name": "X",
"compatibility_date": "2024-12-30",
"compatibility_flags": ["nodejs_compat"],
"assets": {
"directory": ".open-next/assets",
"binding": "ASSETS",
},
"kv_namespaces": [
{
"binding": "NEXT_INC_CACHE_KV",
"id": "NEXT_CACHE_WORKERS_KV",
},
],
"r2_buckets": [
{
"binding": "NEXT_PUBLIC_R2_BUCKET",
"bucket_name": "NEXT_PUBLIC_R2_BUCKET",
},
],
"observability": {
"enabled": true,
},
0 Replies