depatchedmode / simplest-frame

The simplest Farcaster Frame possible

Home Page:https://warpcast.com/depatchedmode/0x0dbb53c2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

> Netlify Dev Fails

iteration-n opened this issue · comments

commented

Hello Depatchedmode, thank you for your "simplest-frames" tuto!

I am on Mac and encountering the following error when trying to "netlify dev":

"Function index has returned an error: Cannot find module ". . . frames.js/node_modules/protobufjs/minimal" imported from ". . . .netlify/functions-serve/index/node_modules/frames.js/dist/chunk-XHG6EYZ7.js","Did you mean to import protobufjs/minimal.js?"

I've navigated to:
. . . .netlify/functions-serve/index/node_modules/frames.js/dist/chunk-XHG6EYZ7.js"

And tried to update the import statement from import _m0 from "protobufjs/minimal"; to:
import _m0 from "protobufjs/minimal.js"; but it is not possible to write this file.

Do you have any tips/insight?

Yes, same here. Is there any workaround?

◈ Function index has returned an error: Cannot find module '/Users/I511648/dev/sapframe/.netlify/functions-serve/index/node_modules/protobufjs/minimal' imported from /Users/I511648/dev/sapframe/.netlify/functions-serve/index/node_modules/frames.js/dist/chunk-XHG6EYZ7.js
Did you mean to import protobufjs/minimal.js?
Error: Cannot find module '/Users/I511648/dev/sapframe/.netlify/functions-serve/index/node_modules/protobufjs/minimal' imported from /Users/I511648/dev/sapframe/.netlify/functions-serve/index/node_modules/frames.js/dist/chunk-XHG6EYZ7.js
Did you mean to import protobufjs/minimal.js?
at finalizeResolution (node:internal/modules/esm/resolve:264:11)
at moduleResolve (node:internal/modules/esm/resolve:917:10)
at defaultResolve (node:internal/modules/esm/resolve:1130:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:240:38)
at ModuleWrap. (node:internal/modules/esm/module_job:85:39)
at link (node:internal/modules/esm/module_job:84:36)

Sorry for the slow reply folks! Managed to reproduce the bug and fix it. It was due to a frames.js dependency.

For now, I've locked the dependency to v0.5.2 to avoid the bug. Will fix it more properly soon!