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

Error: Can't walk dependency graph: Cannot find module #79

Open
dsacramone opened this issue Oct 7, 2020 · 0 comments
Open

Error: Can't walk dependency graph: Cannot find module #79

dsacramone opened this issue Oct 7, 2020 · 0 comments

Comments

@dsacramone
Copy link

dsacramone commented Oct 7, 2020

Hey, I am experiencing an issue when I add this bit into my plugins file:

on('file:preprocessor', require('@cypress/code-coverage/use-browserify-istanbul'));

stack is: React/Typescript/Webpack/Jest/Cypress

Seems it can't follow imports from the root src directory. Node module imports are fine. I have aliased my imports. When remove that line above, all works as before. When I added, things break. I tried not aliasing files, same error.

import {CONSTANT1, CONSTANT2, CONSTANT3} from 'mocks/constants'; <-- breaks
import {UTIL_CONSTANT1} from 'utils/auth'; <--- breaks
import set from 'lodash/set'; <--- fine
import get from 'lodash/get'; <--- fine
import {CONSTANT1, CONSTANT2, CONSTANT3} from '../../src/mocks/constants'; <-- also breaks
import {UTIL_CONSTANT1} from '../../src/utils/auth'; <--- also breaks

full plugin file:

module.exports = (on, config) => {
    const options = {
      webpackOptions: require('../../tools/webpack.config')({ env: 'dev' }),
    };
    on('file:preprocessor', wp(options));
    // cypress coverage
    require('@cypress/code-coverage/task')(on, config);
    on('file:preprocessor', require('@cypress/code-coverage/use-browserify-istanbul'));
    return config;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant