dentonzh/Eggspress

Error when building on Vercel

dentonzh opened this issue · 2 comments

New projects using Eggspress fail to build on Vercel. When executing prebuild.js, none of the required modules (including fs-extra and glob) are available.

This is not an issue on existing projects that were first deployed earlier, likely due to Vercel retrieving all of the dependencies required by prebuild.js from cache.

No new projects will build properly on Vercel until vercel.json is patched.

One tentative solution is to replace fs-extra with fs and to substitute glob with a handwritten function. This will require rewriting parts of prebuild.js.

Resolved with #62 by refactoring prebuild.js to use built-in Node libraries (fs for fs-extra and path for glob).