Unable to connect NextJS with MSW
Unanswered
Transvaal lion posted this in #help-forum
Transvaal lionOP
I cannot get NextJS to work with
[Mock Service Work](https://mswjs.io/). I keep getting an error saying
[Mock Service Work](https://mswjs.io/). I keep getting an error saying
TextEncoder is not defined and when I go to the docs to fix it "https://mswjs.io/docs/migrations/1.x-to-2.x#requestresponsetextencoder-is-not-defined-jest", it still doesn't work! I'm not sure what I'm doing wrong. All I need is NextJS to work with MSW. That's it. If someone can create a github repo that I can fork, then that would be even better!7 Replies
@Transvaal lion Yeah I had a similar issue
Transvaal lionOP
😦
Transvaal lionOP
buml
Transvaal lionOP
bump
@Transvaal lion bump
have you tried the http middleware? app router support isn't super great yet
https://github.com/mswjs/http-middleware
https://github.com/mswjs/http-middleware
@Dayo have you tried the http middleware? app router support isn't super great yet
https://github.com/mswjs/http-middleware
Transvaal lionOP
I haven't, but once I do, I'll leave my response here and close this. Thank you!
@Transvaal lion I haven't, but once I do, I'll leave my response here and close this. Thank you!
alrighty! currently using the http middleware myself with no issues