bahmutov / bahmutov/cypress-markdown-preprocessor

Can't walk dependency graph: cannot find module

Open
#240 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
16
Forks
2
PR merge metrics
No merged PRs in 30d

Description

I want to make use of the cypress markdown preprocessor.
After installing it with npm:
npm i -D cypress-markdown-preprocessor

and configured the plugin:
/ cypress.config.js
const { defineConfig } = require('cypress')
const mdPreprocessor = require('cypress-markdown-preprocessor')

module.exports = defineConfig({
e2e: {
setupNodeEvents(on, config) {
on('file:preprocessor', mdPreprocessor)
return config
},
// use Markdown file from folder "docs" as tests
specPattern: 'docs/**/*.md',
},
})

I created a first test file, which I ran in Cypress. I got an error:
Can't walk dependency graph: Cannot find module in
node_modules@bahmutovcypress-fiddlesrcindex.js'

That is strange because I have this folder in my node_modules:
node_modules\@bahmutov\cypress-fiddle\src\index.js

So, because there was only one place where I had to fill in a require, at the mdPreprocessor cypress config, I don't know what to do.

Olaf

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with cypress.config.js and the reported dependency path, then reproduce the npm installation and Cypress run using a Markdown spec under docs/**/*.md. Compare the module-resolution error with node_modules/@bahmutov/cypress-fiddle/src/index.js; done means the Markdown preprocessor loads the spec without the missing-module error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cypress, javascript, node.js
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.