You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to add yarn pnp support to cypress and ran into following error
**Details:** Error: Cannot find module 'pnpapi'
Require stack:
- /Users/mluo/Library/Caches/Cypress/6.6.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/pnp-webpack-plugin/index.js
- /Users/mluo/Library/Caches/Cypress/6.6.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/@cypress/webpack-batteries-included-preprocessor/index.js
- /Users/mluo/Library/Caches/Cypress/6.6.1/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/child/run_plugins.js
- /Users/mluo/Library/Caches/Cypress/6.6.1/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/child/index.js
Require stack:
- /Users/mluo/Library/Caches/Cypress/6.6.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/pnp-webpack-plugin/index.js
- /Users/mluo/Library/Caches/Cypress/6.6.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/@cypress/webpack-batteries-included-preprocessor/index.js
- /Users/mluo/Library/Caches/Cypress/6.6.1/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/child/run_plugins.js
- /Users/mluo/Library/Caches/Cypress/6.6.1/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/child/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:972:15)
at Function.external_module_.Module._resolveFilename (/Users/mluo/workspace/gitlab/ui-platform/projects/apps/px/.pnp.js:38306:54)
at Module._load (internal/modules/cjs/loader.js:848:27)
at external_module_.Module._load (/Users/mluo/workspace/gitlab/ui-platform/projects/apps/px/.pnp.js:38162:36)
at Function.f._load (electron/js2c/asar_bundle.js:5:12738)
at Module.require (internal/modules/cjs/loader.js:1032:19)
at require (internal/modules/cjs/helpers.js:72:18)
at getSourceLocation (/Users/mluo/Library/Caches/Cypress/6.6.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/pnp-webpack-plugin/index.js:39:15)
at makeResolver (/Users/mluo/Library/Caches/Cypress/6.6.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/pnp-webpack-plugin/index.js:53:26)
at Object.<anonymous> (/Users/mluo/Library/Caches/Cypress/6.6.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/pnp-webpack-plugin/index.js:147:10)
at Module._compile (internal/modules/cjs/loader.js:1152:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1173:10)
at Module.load (internal/modules/cjs/loader.js:992:32)
at Module._load (internal/modules/cjs/loader.js:885:14)
at external_module_.Module._load (/Users/mluo/workspace/gitlab/ui-platform/projects/apps/px/.pnp.js:38162:36)
at Function.f._load (electron/js2c/asar_bundle.js:5:12738)
Cypress server (an Electron app)is forking a new process to compile plugins from user project, however, the webpack config and compile code live with Cypress app.
After chatting with merceyz in channel, it looks like pnp-webpack-plugin assumes it been located within the pnp project and it's not the case here.
Context
Trying to add yarn pnp support to cypress and ran into following error
Cypress server (an Electron app)is forking a new process to compile plugins from user project, however, the webpack config and compile code live with Cypress app.
After chatting with merceyz in channel, it looks like pnp-webpack-plugin assumes it been located within the pnp project and it's not the case here.
https://discord.com/channels/226791405589233664/654372321225605128/822584013377241108
Would that be possible to port what we've done in webpack 5/enhanced-resolve so pnp-webpack-plugin can work in that scenario.
The text was updated successfully, but these errors were encountered: