Webpack throwing error for e2e.ts file esm imports, 12.9.0 #26513
Unanswered
TheAlmightyMight
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Link to the repo https://github.com/TheAlmightyMight/a-tink
It all started with webpack not being able to compile svg React components, then the error below appeared instead when I included svg loader for webpack with webpackPreprocessor. I have no idea what I'm doing wrong.
import '../../src/redux/slices/authToken'
import '../../src/mocks/constants'
Those imports are wrong somehow and webpack does not know how to compile that and that only happens to e2e.ts file for some reason.
I've tried so far:
When I run my end-to-end test the following error is thrown:
Error: Webpack Compilation Error
Module not found: Error: Can't resolve '../../src/redux/slices/authToken' in 'C:\Users\Klim\Desktop\a-tink_react\cypress\support'
Module not found: Error: Can't resolve '../../src/mocks/constants' in 'C:\Users\Klim\Desktop\a-tink_react\cypress\support'
at Watching.handle [as handler] (C:\Users\Klim\Desktop\a-tink_react\node_modules@cypress\webpack-preprocessor\dist\index.js:212:23)
at C:\Users\Klim\Desktop\a-tink_react\node_modules\webpack\lib\Watching.js:290:9
at Hook.eval [as callAsync] (eval at create (C:\Users\Klim\Desktop\a-tink_react\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (C:\Users\Klim\Desktop\a-tink_react\node_modules\tapable\lib\Hook.js:18:14)
at Watching._done (C:\Users\Klim\Desktop\a-tink_react\node_modules\webpack\lib\Watching.js:287:28)
at C:\Users\Klim\Desktop\a-tink_react\node_modules\webpack\lib\Watching.js:209:21
at Compiler.emitRecords (C:\Users\Klim\Desktop\a-tink_react\node_modules\webpack\lib\Compiler.js:919:5)
at C:\Users\Klim\Desktop\a-tink_react\node_modules\webpack\lib\Watching.js:187:22
at C:\Users\Klim\Desktop\a-tink_react\node_modules\webpack\lib\Compiler.js:885:14
at Hook.eval [as callAsync] (eval at create (C:\Users\Klim\Desktop\a-tink_react\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (C:\Users\Klim\Desktop\a-tink_react\node_modules\tapable\lib\Hook.js:18:14)
at C:\Users\Klim\Desktop\a-tink_react\node_modules\webpack\lib\Compiler.js:882:27
at C:\Users\Klim\Desktop\a-tink_react\node_modules\neo-async\async.js:2818:7
at done (C:\Users\Klim\Desktop\a-tink_react\node_modules\neo-async\async.js:3522:9)
at Hook.eval [as callAsync] (eval at create (C:\Users\Klim\Desktop\a-tink_react\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (C:\Users\Klim\Desktop\a-tink_react\node_modules\tapable\lib\Hook.js:18:14)
at C:\Users\Klim\Desktop\a-tink_react\node_modules\webpack\lib\Compiler.js:736:33
at C:\Users\Klim\Desktop\a-tink_react\node_modules\graceful-fs\graceful-fs.js:143:16
at C:\Users\Klim\AppData\Local\Cypress\Cache\12.0.0\Cypress\resources\app\node_modules@packages\server\node_modules\graceful-fs\graceful-fs.js:143:16
at C:\Users\Klim\AppData\Local\Cypress\Cache\12.0.0\Cypress\resources\app\node_modules@packages\server\node_modules\graceful-fs\graceful-fs.js:143:16
at C:\Users\Klim\AppData\Local\Cypress\Cache\12.0.0\Cypress\resources\app\node_modules@packages\server\node_modules\graceful-fs\graceful-fs.js:61:14
at FSReqCallback.oncomplete (node:fs:197:23)
Beta Was this translation helpful? Give feedback.
All reactions