Does not work with Yarn PnP
See original GitHub issueCurrent behavior
When using Yarn berry, the pnp linker will not allow a TS configuration – see failing case here: https://github.com/AaronBuxbaum/cypress-cucumber-preprocessor/tree/master/examples/yarn-pnp-ts-fails
Furthermore, even when you’re using JS, it will throw during the preprocessing step. Note that I’m currently using the esbuild plugin, which may or may not matter. See failing case here: https://github.com/AaronBuxbaum/cypress-cucumber-preprocessor/tree/master/examples/yarn-pnp-cucumber
cypress/e2e/navigation/healthcheck.feature:3:37: ERROR: Could not resolve "/home/abuxbaum/Nuro/frontend/.yarn/__virtual__/@badeball-cypress-cucumber-preprocessor-virtual-151461ef74/0/cache/@badeball-cypress-cucumber-preprocessor-npm-12.0.0-8d30ea0002-53ffdf9717.zip/node_modules/@badeball/cypress-cucumber-preprocessor/lib/registry"
cypress/e2e/navigation/healthcheck.ts:1:34: ERROR: Could not resolve "@badeball/cypress-cucumber-preprocessor"
at failureErrorWithLog (/home/abuxbaum/Nuro/frontend/.yarn/unplugged/esbuild-npm-0.14.51-a22b50b89c/node_modules/esbuild/lib/main.js:1621:15)
at /home/abuxbaum/Nuro/frontend/.yarn/unplugged/esbuild-npm-0.14.51-a22b50b89c/node_modules/esbuild/lib/main.js:1263:28
at runOnEndCallbacks (/home/abuxbaum/Nuro/frontend/.yarn/unplugged/esbuild-npm-0.14.51-a22b50b89c/node_modules/esbuild/lib/main.js:1043:63)
at buildResponseToResult (/home/abuxbaum/Nuro/frontend/.yarn/unplugged/esbuild-npm-0.14.51-a22b50b89c/node_modules/esbuild/lib/main.js:1261:7)
at /home/abuxbaum/Nuro/frontend/.yarn/unplugged/esbuild-npm-0.14.51-a22b50b89c/node_modules/esbuild/lib/main.js:1374:14
at /home/abuxbaum/Nuro/frontend/.yarn/unplugged/esbuild-npm-0.14.51-a22b50b89c/node_modules/esbuild/lib/main.js:675:9
at handleIncomingPacket (/home/abuxbaum/Nuro/frontend/.yarn/unplugged/esbuild-npm-0.14.51-a22b50b89c/node_modules/esbuild/lib/main.js:772:9)
at Socket.readFromStdout (/home/abuxbaum/Nuro/frontend/.yarn/unplugged/esbuild-npm-0.14.51-a22b50b89c/node_modules/esbuild/lib/main.js:641:7)
at Socket.emit (node:events:527:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
Desired behavior
It should work exactly the same as with a node-modules
linker.
Test code to reproduce
https://github.com/AaronBuxbaum/cypress-cucumber-preprocessor/tree/master/examples/yarn-pnp-ts-fails https://github.com/AaronBuxbaum/cypress-cucumber-preprocessor/tree/master/examples/yarn-pnp-cucumber
Versions
- Cypress version: 10.3.1
- Preprocessor version: 12.0.0
- Node version: 16.16.0
Checklist
- I’ve read the FAQ.
- I’ve read Instructions for logging issues.
- I’m not using
cypress-cucumber-preprocessor@4.3.1
(package name has changed and it is no longer the most recent version, see #689).
Issue Analytics
- State:
- Created a year ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Troubleshooting | Yarn
Ever. If you get it, it very likely means that your application is not running with the PnP resolver, meaning that your require...
Read more >Yarn 'PnP' functionality does not work on windows ... - GitHub
Currently installed: node version: v10.15.0 yarn version: 1.12.3 react-scripts: 2.1.2 Windows 10 x64 I have tried few things to enable PnP ...
Read more >What is Yarn PNP and Should You Use It? - Atomic Spin
The first thing to consider is that not all libraries are compatible with the illusion Yarn is presenting with PNP.
Read more >Yarn 3.x PNP typescript CRA eslint not working with VSCode
I ran into this issue a bit ago and found that this is due to the module resolver not pointing to the correct...
Read more >yarn - Getting started with Plug n Play - w3resource
Once you do this, Yarn will create a file named .pnp.js each time you run yarn install rather than the node_modules folder.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Feel free to pull down my repo and change the bundler to whatever you need to test it! That said, generally speaking if you can get esbuild working, you can get anything working 😆
Aha! This works for me. And actually this has made .config.ts work too 😄