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

Export named 'setParallelCanAssign' not provided when importing it #2425

Closed
diazgn opened this issue Sep 6, 2024 · 1 comment · Fixed by #2427
Closed

Export named 'setParallelCanAssign' not provided when importing it #2425

diazgn opened this issue Sep 6, 2024 · 1 comment · Fixed by #2427

Comments

@diazgn
Copy link

diazgn commented Sep 6, 2024

👓 What did you see?

setParallelCanAssign is not available when trying to import it using ES Modules:

import {
  setParallelCanAssign,
  parallelCanAssignHelpers,
} from '@cucumber/cucumber'

SyntaxError: The requested module '@cucumber/cucumber' does not provide an export named 'setParallelCanAssign'

✅ What did you expect to see?

As suggested in README info, I expect to be able to import it and use it.

📦 Which tool/library version are you using?

node v20.12.2
cucumber-js v10.9.0

🔬 How could we reproduce it?

My basic example: https://github.com/diazgn/test-cucumber-parallel

  1. "type": "module" should be configured in package.json
  2. @cucumber/cucumber dependency in package.json
  3. Add the import sentence to any js file: import { setParallelCanAssign } from '@cucumber/cucumber';

📚 Any additional context?

Using require instead of import works correctly.
When importing everything from the package:import * as cucumber from '@cucumber/cucumber', the function is not available.
image

@davidjgoss
Copy link
Contributor

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

Successfully merging a pull request may close this issue.

2 participants