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
I am initializing Cypress with cypress open and I have the package.json file in ../ relative path (one level upper). This does not cause any problem with E2E Testing, and I can run my tests normally. But now I am trying to configure also Component Testing. The error I get is the following one:
Your configFile threw an error from: cypress.config.js
We stopped running your tests because your config file crashed.
catch (err) {
throw new Error(`Failed to require webpack config at ${webpackConfigPath} with error: ${err}`);
}
Stack trace
Error: Failed to require webpack config at /path/to/webpack.config.js with error: /wrong/path/to/package.json`);
The /wrong/path/to/package.json represents that it is searching the file in the wrong folder: it is searching it in the current folder (./), but instead I want it to search in ../.
I do not know if that configuration is correct, or where is the problem that causes the error. If I open cypress from the folder where my package.json is located, there is no error. But I do not want to do it from there, and I do not know why Cypress is searching for the package.json in the path I am located. Again, this does not happen with E2E tests.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am initializing Cypress with
cypress open
and I have thepackage.json
file in../
relative path (one level upper). This does not cause any problem with E2E Testing, and I can run my tests normally. But now I am trying to configure also Component Testing. The error I get is the following one:Your
configFile
threw an error from:cypress.config.js
We stopped running your tests because your config file crashed.
Stack trace
The
/wrong/path/to/package.json
represents that it is searching the file in the wrong folder: it is searching it in the current folder (./
), but instead I want it to search in../
.This is my
cypress.config.js
file:I do not know if that configuration is correct, or where is the problem that causes the error. If I open cypress from the folder where my
package.json
is located, there is no error. But I do not want to do it from there, and I do not know why Cypress is searching for thepackage.json
in the path I am located. Again, this does not happen with E2E tests.Beta Was this translation helpful? Give feedback.
All reactions