sst / ion

SST v3

Home Page:https://sst.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Next.js can't be built when importing `Resource` from middleware

brapifra opened this issue · comments

Steps to reproduce:

  1. Set up basic next.js deployment
  2. Add a middleware.ts file, import Resource from sst and try to use it (e.g. Resource.MySecret.value)

Error

Module build failed: UnhandledSchemeError: Reading from "node:process" is not handled by plugins (Unhandled scheme).
Webpack supports "data:" and "file:" URIs by default.
You may need an additional plugin to handle "node:" URIs.
Import trace for requested module:
node:process
./node_modules/.pnpm/sst@3.0.32_hono@4.4.0/node_modules/sst/dist/resource.js
./node_modules/.pnpm/sst@3.0.32_hono@4.4.0/node_modules/sst/dist/index.js

SST version: 0.0.403

commented

can you try using 3.0.33 of the sst package?

It works with 3.0.33 🥳 Thanks!