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

TypeError: (0 , cypress_cucumber_preprocessor_1.default) is not a function #647

Closed
tharak62 opened this issue Nov 23, 2021 · 2 comments
Closed

Comments

@tharak62
Copy link

Importing cypress_cucumber_preprocessor rather than using require() as below ::

import { default as cucumber } from "cypress-cucumber-preprocessor";
import browserify from "@cypress/browserify-preprocessor";
import resolve from "resolve";

module.exports = (on, config) => {
     const options = {
        ...browserify.defaultOptions,
        typescript: resolve.sync('typescript', { baseDir: config.projectRoot })
     };
     on('file:preprocessor', cucumber(options));

}

I'm getting error as TypeError: (0 , cypress_cucumber_preprocessor_1.default) is not a function
notfunc

git commit errors for typscript type of any

eslint

@riboher
Copy link

riboher commented Jan 7, 2022

Getting the same error here. Seems a problem related with a TypeScript update but I'm not sure since I've been trying with several combinations with no luck.

Being on the latest yarn version doesn't seem to be the issue either, since I've been using it for a while and it worked without major issues, and changing the nodeLinker attribute to node-modules in the .yarnrc.yml file still throws the same error

This is my current dependency setup:

{
  "cypress": "9.2.0",
  "cypress-cucumber-preprocessor": "4.3.1",
  "typescript": "4.5.4",
  "@yarnpkg/pnpify": "3.1.1-rc.10",
},
"packageManager": "yarn@3.1.1"

@badeball
Copy link
Owner

Due to personal reasons, the previous maintainers of this package are stepping down and handing the reigns over to me, a long-time contributor to the project and a user of it myself. This is a responsibility I'm very excited about. Furthermore, I'd like to thank @lgandecki ++ for all the work that they've done so far.

Read more about the transfer of ownership here.

The repository has however moved and all outstanding issues are being closed. This is not a reflection of the perceived importance of your reported issue. However, if after upgrading to the new version, you still find there to be an issue, feel free to open up another ticket or comment below. Please make sure to read CONTRIBUTING.md before doing so.

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

3 participants