Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack Compilation Error #146

Open
TahirMehmood8082 opened this issue Dec 14, 2023 · 2 comments
Open

Webpack Compilation Error #146

TahirMehmood8082 opened this issue Dec 14, 2023 · 2 comments
Labels

Comments

@TahirMehmood8082
Copy link

by cypress when integrate with rails application with gem "cypress-on-rails"
When cypress test run on terminal: "cypress open" generates "Webpack Compilation Error"
Error: Webpack Compilation Error
Module not found: Error: Can't resolve 'cypress-factory' in '/path/spec/cypress/support'
at Watching.handle [as handler] (/home/.cache/Cypress/13.5.1/Cypress/resources/app/node_modules/@packages/server/node_modules/@cypress/webpack-preprocessor/dist/index.js:212:23)
at /home/.cache/Cypress/13.5.1/Cypress/resources/app/node_modules/webpack/lib/Watching.js:303:9
at Hook.eval [as callAsync] (eval at create (/home/.cache/Cypress/13.5.1/Cypress/resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/.cache/Cypress/13.5.1/Cypress/resources/app/node_modules/tapable/lib/Hook.js:18:14)
at Watching._done (/home/.cache/Cypress/13.5.1/Cypress/resources/app/node_modules/webpack/lib/Watching.js:299:28)
at /home/.cache/Cypress/13.5.1/Cypress/resources/app/node_modules/webpack/lib/Watching.js:213:21
at Compiler.emitRecords (/home/.cache/Cypress/13.5.1/Cypress/resources/app/node_modules/webpack/lib/Compiler.js:919:5)
at /home/.cache/Cypress/13.5.1/Cypress/resources/app/node_modules/webpack/lib/Watching.js:191:22
at /home/.cache/Cypress/13.5.1/Cypress/resources/app/node_modules/webpack/lib/Compiler.js:885:14
at Hook.eval [as callAsync] (eval at create (/home/.cache/Cypress/13.5.1/Cypress/resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/.cache/Cypress/13.5.1/Cypress/resources/app/node_modules/tapable/lib/Hook.js:18:14)
at /home/.cache/Cypress/13.5.1/Cypress/resources/app/node_modules/webpack/lib/Compiler.js:882:27
at /home/.cache/Cypress/13.5.1/Cypress/resources/app/node_modules/neo-async/async.js:2818:7
at done (/home/.cache/Cypress/13.5.1/Cypress/resources/app/node_modules/neo-async/async.js:3522:9)
at Hook.eval [as callAsync] (eval at create (/home/.cache/Cypress/13.5.1/Cypress/resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/.cache/Cypress/13.5.1/Cypress/resources/app/node_modules/tapable/lib/Hook.js:18:14)
at /home/.cache/Cypress/13.5.1/Cypress/resources/app/node_modules/webpack/lib/Compiler.js:736:33
at /home/.cache/Cypress/13.5.1/Cypress/resources/app/node_modules/graceful-fs/graceful-fs.js:143:16
at /home/.cache/Cypress/13.5.1/Cypress/resources/app/node_modules/@packages/server/node_modules/graceful-fs/graceful-fs.js:143:16
at /home/.cache/Cypress/13.5.1/Cypress/resources/app/node_modules/@packages/server/node_modules/graceful-fs/graceful-fs.js:143:16
at /home/.cache/Cypress/13.5.1/Cypress/resources/app/node_modules/@packages/server/node_modules/graceful-fs/graceful-fs.js:61:14
at FSReqCallback.oncomplete (node:fs:200:23)

When i tried to add package, normally webpack compilation error caused when package is missing or import hierarchy issue,
yarn add cypress-factory
yarn add v1.22.19
[1/5] Validating package.json...
[2/5] Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/cypress-factory: Not found".
info If you think this is a bug, please open a bug report with the information provided in "/path/Rails/my-project-name/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

i know wrong import cause webpack issue, but in my scenario there is not any wrong import

@justin808
Copy link
Member

Typo?

image

@TahirMehmood8082
Copy link
Author

TahirMehmood8082 commented Dec 15, 2023

but point is, i have use factory-bot gem of ruby on rails and i watched this npm package
01-there is nothing cypress-factory written in my code or files i double check this, from where it is orignating?
02-usually webpack isuues originated from wrong import, but here is not this case
03-so what is real isuue??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants