How to solve this error message Error: Webpack Compilation Error within cypress?

I’m currently using my cypress project, and it seems that at the time that I’m trying to run my test scenarios, I’m having the following issues:

Error: Webpack Compilation Error
./cypress/support/commands.js
Module not found: Error: Can't resolve './cypress/fixture/letestLead.json' in 'C:UsersaharoDesktopAutomationcb-automation-cypresscypresssupport'
Looked for and couldn't find the file at the following paths:
[C:UsersaharoDesktopAutomationcb-automation-cypresscypresssupportcypressfixtureletestLead.json]
[C:UsersaharoDesktopAutomationcb-automation-cypresscypresssupportcypressfixtureletestLead.json.js]
[C:UsersaharoDesktopAutomationcb-automation-cypresscypresssupportcypressfixtureletestLead.json.json]
[C:UsersaharoDesktopAutomationcb-automation-cypresscypresssupportcypressfixtureletestLead.json.jsx]
[C:UsersaharoDesktopAutomationcb-automation-cypresscypresssupportcypressfixtureletestLead.json.mjs]
[C:UsersaharoDesktopAutomationcb-automation-cypresscypresssupportcypressfixtureletestLead.json.coffee]
[C:UsersaharoDesktopAutomationcb-automation-cypresscypresssupportcypressfixtureletestLead.json.ts]
[C:UsersaharoDesktopAutomationcb-automation-cypresscypresssupportcypressfixtureletestLead.json.tsx]
 @ ./cypress/support/commands.js 575:13-57
 @ ./cypress/support/index.js
 
    at Watching.handle [as handler] (C:UsersaharoAppDataLoc[email protected]cypresswebpack-preprocessordistindex.js:172:23)
    at C:UsersaharoAppDataLocalCypressCache.5.0Cypressresourcesapppackagesservernode_moduleswebpacklibWatching.js:99:9
    at AsyncSeriesHook.eval [as callAsync] (eval at create (C:UsersaharoAppDataLocalCypressCache.5.0Cypressresourcesapppackagesservernode_modulestapablelibHookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (C:UsersaharoAppDataLocalCypressCache.5.0Cypressresourcesapppackagesservernode_modulestapablelibHook.js:154:20)
    at Watching._done (C:UsersaharoAppDataLocalCypressCache.5.0Cypressresourcesapppackagesservernode_moduleswebpacklibWatching.js:98:28)
    at C:UsersaharoAppDataLocalCypressCache.5.0Cypressresourcesapppackagesservernode_moduleswebpacklibWatching.js:73:19
    at Compiler.emitRecords (C:UsersaharoAppDataLocalCypressCache.5.0Cypressresourcesapppackagesservernode_moduleswebpacklibCompiler.js:499:39)
    at C:UsersaharoAppDataLocalCypressCache.5.0Cypressresourcesapppackagesservernode_moduleswebpacklibWatching.js:54:20
    at C:UsersaharoAppDataLocalCypressCache.5.0Cypressresourcesapppackagesservernode_moduleswebpacklibCompiler.js:485:14
    at AsyncSeriesHook.eval [as callAsync] (eval at create (C:UsersaharoAppDataLocalCypressCache.5.0Cypressresourcesapppackagesservernode_modulestapablelibHookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (C:UsersaharoAppDataLocalCypressCache.5.0Cypressresourcesapppackagesservernode_modulestapablelibHook.js:154:20)
    at C:UsersaharoAppDataLocalCypressCache.5.0Cypressresourcesapppackagesservernode_moduleswebpacklibCompiler.js:482:27
    at C:UsersaharoAppDataLocalCypressCache.5.0Cypressresourcesapppackagesservernode_modulesneo-asyncasync.js:2818:7
    at done (C:UsersaharoAppDataLocalCypressCache.5.0Cypressresourcesapppackagesservernode_modulesneo-asyncasync.js:3522:9)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (C:UsersaharoAppDataLocalCypressCache.5.0Cypressresourcesapppackagesservernode_modulestapablelibHookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (C:UsersaharoAppDataLocalCypressCache.5.0Cypressresourcesapppackagesservernode_modulestapablelibHook.js:154:20)
    at C:UsersaharoAppDataLocalCypressCache.5.0Cypressresourcesapppackagesservernode_moduleswebpacklibCompiler.js:464:33
    at C:UsersaharoAppDataLocalCypressCache.5.0Cypressresourcesapppackagesservernode_modulesgraceful-fsgraceful-fs.js:111:16
    at C:UsersaharoDesktopAutomationcb-automation-cypressnode_modulesgraceful-fsgraceful-fs.js:61:14
    at C:UsersaharoAppDataLocalCypressCache.5.0Cypressresourcesapppackagesservernode_modulesgraceful-fsgraceful-fs.js:45:10
    at FSReqCallback.oncomplete (fs.js:160:23)

What can I do to fix this issue, and to fix this error message? Does anyone have any idea of how to resolve this issue?

Source: Ask Javascript Questions

LEAVE A COMMENT