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
How are you deploying your application? (if relevant)
No response
Describe the Bug
Using the new app folder with the plugin swc-plugin-coverage-instrument breaks.
I get the following error when trying to visit a simple index page:
error - (sc_server)\node_modules\next\dist\shared\lib\app-router-context.js (10:40) @ eval
error - TypeError: _react.default.createContext is not a function
at eval (webpack-internal:///(sc_server)/./node_modules/next/dist/shared/lib/app-router-context.js:297:77)
at Object.(sc_server)/./node_modules/next/dist/shared/lib/app-router-context.js (C:\Users\Warrows\workspace\repronext\swc-coverage\.next\server\app\page.js:920:1)
at __webpack_require__ (C:\Users\Warrows\workspace\repronext\swc-coverage\.next\server\webpack-runtime.js:33:42)
at eval (webpack-internal:///(sc_server)/./node_modules/next/dist/client/components/app-router.js:2314:61)
at Object.(sc_server)/./node_modules/next/dist/client/components/app-router.js (C:\Users\Warrows\workspace\repronext\swc-coverage\.next\server\app\page.js:197:1)
at __webpack_require__ (C:\Users\Warrows\workspace\repronext\swc-coverage\.next\server\webpack-runtime.js:33:42)
at eval (webpack-internal:///(sc_server)/./node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fpage&appPaths=%2Fpage&pagePath=private-next-app-dir%2Fpage.tsx&appDir=C%3A%5CUsers%5CWarrows%5Cworkspace%5Crepronext%5Cswc-coverage%5Capp&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&rootDir=C%3A%5CUsers%5CWarrows%5Cworkspace%5Crepronext%5Cswc-coverage&isDev=true&tsconfigPath=tsconfig.json!:28:24)
at Object.(sc_server)/./node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fpage&appPaths=%2Fpage&pagePath=private-next-app-dir%2Fpage.tsx&appDir=C%3A%5CUsers%5CWarrows%5Cworkspace%5Crepronext%5Cswc-coverage%5Capp&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&rootDir=C%3A%5CUsers%5CWarrows%5Cworkspace%5Crepronext%5Cswc-coverage&isDev=true&tsconfigPath=tsconfig.json! (C:\Users\Warrows\workspace\repronext\swc-coverage\.next\server\app\page.js:99:1)
at __webpack_require__ (C:\Users\Warrows\workspace\repronext\swc-coverage\.next\server\webpack-runtime.js:33:42)
at __webpack_exec__ (C:\Users\Warrows\workspace\repronext\swc-coverage\.next\server\app\page.js:974:39) {
page: '/'
}
null
It's possible to avoid the problem by using babel (with babel-plugin-istanbul) instead of swc or by staying with old pages instead of the app folder.
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Verify canary release
Provide environment information
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
Using the new app folder with the plugin
swc-plugin-coverage-instrument
breaks.I get the following error when trying to visit a simple index page:
It's possible to avoid the problem by using babel (with
babel-plugin-istanbul
) instead of swc or by staying with old pages instead of the app folder.Expected Behavior
The index page should load
Link to reproduction
https://github.com/gaetleba/swc-plugin-coverage-instrument-bug-reproduction
To Reproduce
Try to open the index page and you should get the error.
The text was updated successfully, but these errors were encountered: