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
We have a nextjs project and using component-level css. I tried with the nextjs sample and it works. But it got error as below when importing import styles from './<component>.module.scss';. Looks mini-css-extract-plugin issue and the log similar to nrwl/nx#2174. Any idea?
Error: Webpack Compilation Error
./components/Search.module.scss
Module build failed (from /Users/eur/Desktop/dev_uba/cypress-react-unit-test/node_modules/@zeit/next-css/node_modules/mini-css-extract-plugin/dist/loader.js):
TypeError: this[MODULE_TYPE] is not a function
@ ./components/Search.jsx 5:0-42
@ ./cypress/components/Search.spec.jsx
add import styles from './Search.module.scss'; to cypress-react-unit-test/examples/nextjs/components/Search.jsx
run npm test and got error
The text was updated successfully, but these errors were encountered:
yrue
changed the title
test failed on nextjs test with component-level css
Tests failed on nextjs test with component-level css
Oct 11, 2020
yrue
changed the title
Tests failed on nextjs test with component-level css
Get Webpack Compilation Error on nextjs test with component-level css
Oct 20, 2020
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.
Hi,
We have a nextjs project and using component-level css. I tried with the nextjs sample and it works. But it got error as below when importing
import styles from './<component>.module.scss';
. Looks mini-css-extract-plugin issue and the log similar to nrwl/nx#2174. Any idea?Reproduce
repo: https://github.com/yrue/cypress-react-unit-test/tree/issue
"nodeVersion": "system"
to cypress.jsoncypress-react-unit-test/examples/nextjs/components/Search.module.scss
import styles from './Search.module.scss';
tocypress-react-unit-test/examples/nextjs/components/Search.jsx
npm test
and got errorThe text was updated successfully, but these errors were encountered: