You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Node.js Middleware has hardcoded /_middleware path
390
+
if(manifest.functions['/_middleware']){
391
+
thrownewError(
392
+
'Node.js middleware is not yet supported.\n\n'+
393
+
'Future @netlify/plugin-nextjs release will support node middleware with following limitations:\n'+
394
+
' - usage of C++ Addons (https://nodejs.org/api/addons.html) not supported (for example `bcrypt` npm module will not be supported, but `bcryptjs` will be supported),\n'+
395
+
' - usage of Filesystem (https://nodejs.org/api/fs.html) not supported.',
'should throw an Not Supported error when node middleware is used',
633
+
async(ctx)=>{
634
+
awaitcreateFixture('middleware-node',ctx)
635
+
636
+
construnPluginPromise=runPlugin(ctx)
637
+
638
+
awaitexpect(runPluginPromise).rejects.toThrow('Node.js middleware is not yet supported.')
639
+
awaitexpect(runPluginPromise).rejects.toThrow(
640
+
'Future @netlify/plugin-nextjs release will support node middleware with following limitations:',
641
+
)
642
+
awaitexpect(runPluginPromise).rejects.toThrow(
643
+
' - usage of C++ Addons (https://nodejs.org/api/addons.html) not supported (for example `bcrypt` npm module will not be supported, but `bcryptjs` will be supported)',
644
+
)
645
+
awaitexpect(runPluginPromise).rejects.toThrow(
646
+
' - usage of Filesystem (https://nodejs.org/api/fs.html) not supported',
0 commit comments