cucumber / cucumber-js

Cucumber for JavaScript
https://cucumber.io
MIT License
5.07k stars 1.09k forks source link

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

Closed diazgn closed 2 months ago

diazgn commented 2 months ago

👓 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 commented 2 months ago

Released in https://github.com/cucumber/cucumber-js/releases/tag/v11.0.1