rest
package now found in msw
when building with NextJS 14
#1021
-
I have been migrating my application to NextJS 14 and if I use ./api/admin/admin.msw.ts:14:10
Type error: Module '"msw"' has no exported member 'rest'.
12 | */
13 | import { faker } from "@faker-js/faker";
> 14 | import { rest } from "msw";
| ^
15 |
16 | export const getGetSchoolYearsMock = () =>
17 | Array.from( I have
Wonder if this is something to do with Thank you for your time. Node version: v21.1.0 |
Beta Was this translation helpful? Give feedback.
Answered by
Will-Mann-16
Nov 8, 2023
Replies: 1 comment 1 reply
-
@Will-Mann-16 just added MSW 2.0 support to the next version he may be able to answer |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeah this is because you're on MSW 2.0 where they removed the
rest
operator in favour ofhttp
. I've upgraded main to reflect this, just waiting on a release. In the meantime if you downgrade msw to v1 it'll work just fine.