-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
@mdx-js/loader
v1 does not work with yarn pnp or pnpm
#2019
Comments
Have you tried using mdx 2? |
See this bit in the original report.
|
A similar if not the same issue is being tracked at storybookjs/builder-vite#55 MDX 2 was created to untangle the dependencies (among many other benefits). If this support is needed, please help the projects using version 1 upgrade to version 2. |
Does not appear to be at all the same. I'm using webpack, not vite.
They've only been working on that for over a year, let's go with that rather than the simple 1- or 2-line fix in this package. 🙄 |
There was some discussion of this while version 1 was the active release line, the proposed fix is much more complex than a one line change #1300 |
Hmm. I did miss the missing react peer dep in the fix I proposed here, and maybe fixing backslashes for Windows compatibility. It's not clear to me why the PR there resolves "react/package,json" then removes the filename though, instead of just resolving the package directly. And I only concerned myself with this loader and not the two others it seems you have. Too bad it wasn't fixed back then. Not even by doing what someone suggested as an alternative and making the runtime a peer dep of the loader. |
We've long had pnpm's public hoisting disabled, but it also privately hoists everything into `node_modules/.pnpm/node_modules/` for compatibility with packages that have undeclared dependencies. Let's disable most of that private hoisting and see what turns up. Changes of note: * We still hoist a bunch of eslint plugins (and one prettier plugin) as untangling that mess seems like enough work to put off for later. * Only a few upstream packages have bugs that need working around: * `@mdx-js/loader`: mdx-js/mdx#2019 * `@automattic/components`: Missing dep on `@wordpress/base-styles`. And the next version will probably be unusable for us due to added `i18n-calypso`. * `@automattic/popup-monitor`: Missing dep on `events`. * markdown-it`: Missing dep on `punycode`. markdown-it/markdown-it#230 * `@samverschueren/stream-to-observable`: Outdated dep on `any-observable`. SamVerschueren/stream-to-observable#9 Hacking around that should also fix p1649254510834369-slack-CBG1CP4EN. * `fetch-mock`'s peer dep on `node-fetch` is optional, but only because they also allow running in-browser. It's required for node. * Added `webpack-cli` alongside `webpack` everywhere to make sure p1650571211251179-slack-CBG1CP4EN is fixed. Dropped Webpack entirely from Boost instead though, they don't use it. * Had our webpack-config package point to its own copy of `@babel/runtime` instead of making that a peer dep. * Jetpack's extensions tests use a ton of `@wordpress/` packages that weren't being directly depended on.
We've long had pnpm's public hoisting disabled, but it also privately hoists everything into `node_modules/.pnpm/node_modules/` for compatibility with packages that have undeclared dependencies. Let's disable most of that private hoisting and see what turns up. Changes of note: * We still hoist a bunch of eslint plugins (and one prettier plugin) as untangling that mess seems like enough work to put off for later. * Only a few upstream packages have bugs that need working around: * `@mdx-js/loader`: mdx-js/mdx#2019 * `@automattic/components`: Missing dep on `@wordpress/base-styles`. And the next version will probably be unusable for us due to added `i18n-calypso`. * `@automattic/popup-monitor`: Missing dep on `events`. * markdown-it`: Missing dep on `punycode`. markdown-it/markdown-it#230 * `@samverschueren/stream-to-observable`: Outdated dep on `any-observable`. SamVerschueren/stream-to-observable#9 Hacking around that should also fix p1649254510834369-slack-CBG1CP4EN. * `git-node-fs`: Missing peer dep on `js-git`. creationix/git-node-fs#8 * `fetch-mock`'s peer dep on `node-fetch` is optional, but only because they also allow running in-browser. It's required for node. * Added `webpack-cli` alongside `webpack` everywhere to make sure p1650571211251179-slack-CBG1CP4EN is fixed. Dropped Webpack entirely from Boost instead though, they don't use it. * Had our webpack-config package point to its own copy of `@babel/runtime` instead of making that a peer dep. * Jetpack's extensions tests use a ton of `@wordpress/` packages that weren't being directly depended on.
We've long had pnpm's public hoisting disabled, but it also privately hoists everything into `node_modules/.pnpm/node_modules/` for compatibility with packages that have undeclared dependencies. Let's disable most of that private hoisting and see what turns up. Changes of note: * We still hoist a bunch of eslint plugins (and one prettier plugin) as untangling that mess seems like enough work to put off for later. * Only a few upstream packages have bugs that need working around: * `@mdx-js/loader`: mdx-js/mdx#2019 * `@automattic/components`: Missing dep on `@wordpress/base-styles`. And the next version will probably be unusable for us due to added `i18n-calypso`. * `@automattic/popup-monitor`: Missing dep on `events`. * markdown-it`: Missing dep on `punycode`. markdown-it/markdown-it#230 * `@samverschueren/stream-to-observable`: Outdated dep on `any-observable`. SamVerschueren/stream-to-observable#9 Hacking around that should also fix p1649254510834369-slack-CBG1CP4EN. * `git-node-fs`: Missing peer dep on `js-git`. creationix/git-node-fs#8 * `fetch-mock`'s peer dep on `node-fetch` is optional, but only because they also allow running in-browser. It's required for node. * Added `webpack-cli` alongside `webpack` everywhere to make sure p1650571211251179-slack-CBG1CP4EN is fixed. Dropped Webpack entirely from Boost instead though, they don't use it. * Had our webpack-config package point to its own copy of `@babel/runtime` instead of making that a peer dep. * Jetpack's extensions tests use a ton of `@wordpress/` packages that weren't being directly depended on. Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/2234009376
We've long had pnpm's public hoisting disabled, but it also privately hoists everything into `node_modules/.pnpm/node_modules/` for compatibility with packages that have undeclared dependencies. Let's disable most of that private hoisting and see what turns up. Changes of note: * We still hoist a bunch of eslint plugins (and one prettier plugin) as untangling that mess seems like enough work to put off for later. * Only a few upstream packages have bugs that need working around: * `@mdx-js/loader`: mdx-js/mdx#2019 * `@automattic/components`: Missing dep on `@wordpress/base-styles`. And the next version will probably be unusable for us due to added `i18n-calypso`. * `@automattic/popup-monitor`: Missing dep on `events`. * markdown-it`: Missing dep on `punycode`. markdown-it/markdown-it#230 * `@samverschueren/stream-to-observable`: Outdated dep on `any-observable`. SamVerschueren/stream-to-observable#9 Hacking around that should also fix p1649254510834369-slack-CBG1CP4EN. * `git-node-fs`: Missing peer dep on `js-git`. creationix/git-node-fs#8 * `fetch-mock`'s peer dep on `node-fetch` is optional, but only because they also allow running in-browser. It's required for node. * Added `webpack-cli` alongside `webpack` everywhere to make sure p1650571211251179-slack-CBG1CP4EN is fixed. Dropped Webpack entirely from Boost instead though, they don't use it. * Had our webpack-config package point to its own copy of `@babel/runtime` instead of making that a peer dep. * Jetpack's extensions tests use a ton of `@wordpress/` packages that weren't being directly depended on. Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/2234009376
We've long had pnpm's public hoisting disabled, but it also privately hoists everything into `node_modules/.pnpm/node_modules/` for compatibility with packages that have undeclared dependencies. Let's disable most of that private hoisting and see what turns up. Changes of note: * We still hoist a bunch of eslint plugins (and one prettier plugin) as untangling that mess seems like enough work to put off for later. * Only a few upstream packages have bugs that need working around: * `@mdx-js/loader`: mdx-js/mdx#2019 * `@automattic/components`: Missing dep on `@wordpress/base-styles`. And the next version will probably be unusable for us due to added `i18n-calypso`. * `@automattic/popup-monitor`: Missing dep on `events`. * markdown-it`: Missing dep on `punycode`. markdown-it/markdown-it#230 * `@samverschueren/stream-to-observable`: Outdated dep on `any-observable`. SamVerschueren/stream-to-observable#9 Hacking around that should also fix p1649254510834369-slack-CBG1CP4EN. * `git-node-fs`: Missing peer dep on `js-git`. creationix/git-node-fs#8 * `fetch-mock`'s peer dep on `node-fetch` is optional, but only because they also allow running in-browser. It's required for node. * Added `webpack-cli` alongside `webpack` everywhere to make sure p1650571211251179-slack-CBG1CP4EN is fixed. Dropped Webpack entirely from Boost instead though, they don't use it. * Had our webpack-config package point to its own copy of `@babel/runtime` instead of making that a peer dep. * Jetpack's extensions tests use a ton of `@wordpress/` packages that weren't being directly depended on. Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/2234009376
We've long had pnpm's public hoisting disabled, but it also privately hoists everything into `node_modules/.pnpm/node_modules/` for compatibility with packages that have undeclared dependencies. Let's disable most of that private hoisting and see what turns up. Changes of note: * We still hoist a bunch of eslint plugins (and one prettier plugin) as untangling that mess seems like enough work to put off for later. * Only a few upstream packages have bugs that need working around: * `@mdx-js/loader`: mdx-js/mdx#2019 * `@automattic/components`: Missing dep on `@wordpress/base-styles`. And the next version will probably be unusable for us due to added `i18n-calypso`. * `@automattic/popup-monitor`: Missing dep on `events`. * markdown-it`: Missing dep on `punycode`. markdown-it/markdown-it#230 * `@samverschueren/stream-to-observable`: Outdated dep on `any-observable`. SamVerschueren/stream-to-observable#9 Hacking around that should also fix p1649254510834369-slack-CBG1CP4EN. * `git-node-fs`: Missing peer dep on `js-git`. creationix/git-node-fs#8 * `fetch-mock`'s peer dep on `node-fetch` is optional, but only because they also allow running in-browser. It's required for node. * Added `webpack-cli` alongside `webpack` everywhere to make sure p1650571211251179-slack-CBG1CP4EN is fixed. Dropped Webpack entirely from Boost instead though, they don't use it. * Had our webpack-config package point to its own copy of `@babel/runtime` instead of making that a peer dep. * Jetpack's extensions tests use a ton of `@wordpress/` packages that weren't being directly depended on. Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/2234009376
We've long had pnpm's public hoisting disabled, but it also privately hoists everything into `node_modules/.pnpm/node_modules/` for compatibility with packages that have undeclared dependencies. Let's disable most of that private hoisting and see what turns up. Changes of note: * We still hoist a bunch of eslint plugins (and one prettier plugin) as untangling that mess seems like enough work to put off for later. * Only a few upstream packages have bugs that need working around: * `@mdx-js/loader`: mdx-js/mdx#2019 * `@automattic/components`: Missing dep on `@wordpress/base-styles`. And the next version will probably be unusable for us due to added `i18n-calypso`. * `@automattic/popup-monitor`: Missing dep on `events`. * markdown-it`: Missing dep on `punycode`. markdown-it/markdown-it#230 * `@samverschueren/stream-to-observable`: Outdated dep on `any-observable`. SamVerschueren/stream-to-observable#9 Hacking around that should also fix p1649254510834369-slack-CBG1CP4EN. * `git-node-fs`: Missing peer dep on `js-git`. creationix/git-node-fs#8 * `fetch-mock`'s peer dep on `node-fetch` is optional, but only because they also allow running in-browser. It's required for node. * Added `webpack-cli` alongside `webpack` everywhere to make sure p1650571211251179-slack-CBG1CP4EN is fixed. Dropped Webpack entirely from Boost instead though, they don't use it. * Had our webpack-config package point to its own copy of `@babel/runtime` instead of making that a peer dep. * Jetpack's extensions tests use a ton of `@wordpress/` packages that weren't being directly depended on. Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/2234009376
We've long had pnpm's public hoisting disabled, but it also privately hoists everything into `node_modules/.pnpm/node_modules/` for compatibility with packages that have undeclared dependencies. Let's disable most of that private hoisting and see what turns up. Changes of note: * We still hoist a bunch of eslint plugins (and one prettier plugin) as untangling that mess seems like enough work to put off for later. * Only a few upstream packages have bugs that need working around: * `@mdx-js/loader`: mdx-js/mdx#2019 * `@automattic/components`: Missing dep on `@wordpress/base-styles`. And the next version will probably be unusable for us due to added `i18n-calypso`. * `@automattic/popup-monitor`: Missing dep on `events`. * markdown-it`: Missing dep on `punycode`. markdown-it/markdown-it#230 * `@samverschueren/stream-to-observable`: Outdated dep on `any-observable`. SamVerschueren/stream-to-observable#9 Hacking around that should also fix p1649254510834369-slack-CBG1CP4EN. * `git-node-fs`: Missing peer dep on `js-git`. creationix/git-node-fs#8 * `fetch-mock`'s peer dep on `node-fetch` is optional, but only because they also allow running in-browser. It's required for node. * Added `webpack-cli` alongside `webpack` everywhere to make sure p1650571211251179-slack-CBG1CP4EN is fixed. Dropped Webpack entirely from Boost instead though, they don't use it. * Had our webpack-config package point to its own copy of `@babel/runtime` instead of making that a peer dep. * Jetpack's extensions tests use a ton of `@wordpress/` packages that weren't being directly depended on. Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/2234009376
We've long had pnpm's public hoisting disabled, but it also privately hoists everything into `node_modules/.pnpm/node_modules/` for compatibility with packages that have undeclared dependencies. Let's disable most of that private hoisting and see what turns up. Changes of note: * We still hoist a bunch of eslint plugins (and one prettier plugin) as untangling that mess seems like enough work to put off for later. * Only a few upstream packages have bugs that need working around: * `@mdx-js/loader`: mdx-js/mdx#2019 * `@automattic/components`: Missing dep on `@wordpress/base-styles`. And the next version will probably be unusable for us due to added `i18n-calypso`. * `@automattic/popup-monitor`: Missing dep on `events`. * markdown-it`: Missing dep on `punycode`. markdown-it/markdown-it#230 * `@samverschueren/stream-to-observable`: Outdated dep on `any-observable`. SamVerschueren/stream-to-observable#9 Hacking around that should also fix p1649254510834369-slack-CBG1CP4EN. * `git-node-fs`: Missing peer dep on `js-git`. creationix/git-node-fs#8 * `fetch-mock`'s peer dep on `node-fetch` is optional, but only because they also allow running in-browser. It's required for node. * Added `webpack-cli` alongside `webpack` everywhere to make sure p1650571211251179-slack-CBG1CP4EN is fixed. Dropped Webpack entirely from Boost instead though, they don't use it. * Had our webpack-config package point to its own copy of `@babel/runtime` instead of making that a peer dep. * Jetpack's extensions tests use a ton of `@wordpress/` packages that weren't being directly depended on. Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/2234009376
We've long had pnpm's public hoisting disabled, but it also privately hoists everything into `node_modules/.pnpm/node_modules/` for compatibility with packages that have undeclared dependencies. Let's disable most of that private hoisting and see what turns up. Changes of note: * We still hoist a bunch of eslint plugins (and one prettier plugin) as untangling that mess seems like enough work to put off for later. * Only a few upstream packages have bugs that need working around: * `@mdx-js/loader`: mdx-js/mdx#2019 * `@automattic/components`: Missing dep on `@wordpress/base-styles`. And the next version will probably be unusable for us due to added `i18n-calypso`. * `@automattic/popup-monitor`: Missing dep on `events`. * markdown-it`: Missing dep on `punycode`. markdown-it/markdown-it#230 * `@samverschueren/stream-to-observable`: Outdated dep on `any-observable`. SamVerschueren/stream-to-observable#9 Hacking around that should also fix p1649254510834369-slack-CBG1CP4EN. * `git-node-fs`: Missing peer dep on `js-git`. creationix/git-node-fs#8 * `fetch-mock`'s peer dep on `node-fetch` is optional, but only because they also allow running in-browser. It's required for node. * Added `webpack-cli` alongside `webpack` everywhere to make sure p1650571211251179-slack-CBG1CP4EN is fixed. Dropped Webpack entirely from Boost instead though, they don't use it. * Had our webpack-config package point to its own copy of `@babel/runtime` instead of making that a peer dep. * Jetpack's extensions tests use a ton of `@wordpress/` packages that weren't being directly depended on. Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/2234009376
We've long had pnpm's public hoisting disabled, but it also privately hoists everything into `node_modules/.pnpm/node_modules/` for compatibility with packages that have undeclared dependencies. Let's disable most of that private hoisting and see what turns up. Changes of note: * We still hoist a bunch of eslint plugins (and one prettier plugin) as untangling that mess seems like enough work to put off for later. * Only a few upstream packages have bugs that need working around: * `@mdx-js/loader`: mdx-js/mdx#2019 * `@automattic/components`: Missing dep on `@wordpress/base-styles`. And the next version will probably be unusable for us due to added `i18n-calypso`. * `@automattic/popup-monitor`: Missing dep on `events`. * markdown-it`: Missing dep on `punycode`. markdown-it/markdown-it#230 * `@samverschueren/stream-to-observable`: Outdated dep on `any-observable`. SamVerschueren/stream-to-observable#9 Hacking around that should also fix p1649254510834369-slack-CBG1CP4EN. * `git-node-fs`: Missing peer dep on `js-git`. creationix/git-node-fs#8 * `fetch-mock`'s peer dep on `node-fetch` is optional, but only because they also allow running in-browser. It's required for node. * Added `webpack-cli` alongside `webpack` everywhere to make sure p1650571211251179-slack-CBG1CP4EN is fixed. Dropped Webpack entirely from Boost instead though, they don't use it. * Had our webpack-config package point to its own copy of `@babel/runtime` instead of making that a peer dep. * Jetpack's extensions tests use a ton of `@wordpress/` packages that weren't being directly depended on. Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/2234009376
We've long had pnpm's public hoisting disabled, but it also privately hoists everything into `node_modules/.pnpm/node_modules/` for compatibility with packages that have undeclared dependencies. Let's disable most of that private hoisting and see what turns up. Changes of note: * We still hoist a bunch of eslint plugins (and one prettier plugin) as untangling that mess seems like enough work to put off for later. * Only a few upstream packages have bugs that need working around: * `@mdx-js/loader`: mdx-js/mdx#2019 * `@automattic/components`: Missing dep on `@wordpress/base-styles`. And the next version will probably be unusable for us due to added `i18n-calypso`. * `@automattic/popup-monitor`: Missing dep on `events`. * markdown-it`: Missing dep on `punycode`. markdown-it/markdown-it#230 * `@samverschueren/stream-to-observable`: Outdated dep on `any-observable`. SamVerschueren/stream-to-observable#9 Hacking around that should also fix p1649254510834369-slack-CBG1CP4EN. * `git-node-fs`: Missing peer dep on `js-git`. creationix/git-node-fs#8 * `fetch-mock`'s peer dep on `node-fetch` is optional, but only because they also allow running in-browser. It's required for node. * Added `webpack-cli` alongside `webpack` everywhere to make sure p1650571211251179-slack-CBG1CP4EN is fixed. Dropped Webpack entirely from Boost instead though, they don't use it. * Had our webpack-config package point to its own copy of `@babel/runtime` instead of making that a peer dep. * Jetpack's extensions tests use a ton of `@wordpress/` packages that weren't being directly depended on. Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/2234009376
We've long had pnpm's public hoisting disabled, but it also privately hoists everything into `node_modules/.pnpm/node_modules/` for compatibility with packages that have undeclared dependencies. Let's disable most of that private hoisting and see what turns up. Changes of note: * We still hoist a bunch of eslint plugins (and one prettier plugin) as untangling that mess seems like enough work to put off for later. * Only a few upstream packages have bugs that need working around: * `@mdx-js/loader`: mdx-js/mdx#2019 * `@automattic/components`: Missing dep on `@wordpress/base-styles`. And the next version will probably be unusable for us due to added `i18n-calypso`. * `@automattic/popup-monitor`: Missing dep on `events`. * markdown-it`: Missing dep on `punycode`. markdown-it/markdown-it#230 * `@samverschueren/stream-to-observable`: Outdated dep on `any-observable`. SamVerschueren/stream-to-observable#9 Hacking around that should also fix p1649254510834369-slack-CBG1CP4EN. * `git-node-fs`: Missing peer dep on `js-git`. creationix/git-node-fs#8 * `fetch-mock`'s peer dep on `node-fetch` is optional, but only because they also allow running in-browser. It's required for node. * Added `webpack-cli` alongside `webpack` everywhere to make sure p1650571211251179-slack-CBG1CP4EN is fixed. Dropped Webpack entirely from Boost instead though, they don't use it. * Had our webpack-config package point to its own copy of `@babel/runtime` instead of making that a peer dep. * Jetpack's extensions tests use a ton of `@wordpress/` packages that weren't being directly depended on. Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/2234009376
We've long had pnpm's public hoisting disabled, but it also privately hoists everything into `node_modules/.pnpm/node_modules/` for compatibility with packages that have undeclared dependencies. Let's disable most of that private hoisting and see what turns up. Changes of note: * We still hoist a bunch of eslint plugins (and one prettier plugin) as untangling that mess seems like enough work to put off for later. * Only a few upstream packages have bugs that need working around: * `@mdx-js/loader`: mdx-js/mdx#2019 * `@automattic/components`: Missing dep on `@wordpress/base-styles`. And the next version will probably be unusable for us due to added `i18n-calypso`. * `@automattic/popup-monitor`: Missing dep on `events`. * markdown-it`: Missing dep on `punycode`. markdown-it/markdown-it#230 * `@samverschueren/stream-to-observable`: Outdated dep on `any-observable`. SamVerschueren/stream-to-observable#9 Hacking around that should also fix p1649254510834369-slack-CBG1CP4EN. * `git-node-fs`: Missing peer dep on `js-git`. creationix/git-node-fs#8 * `fetch-mock`'s peer dep on `node-fetch` is optional, but only because they also allow running in-browser. It's required for node. * Added `webpack-cli` alongside `webpack` everywhere to make sure p1650571211251179-slack-CBG1CP4EN is fixed. Dropped Webpack entirely from Boost instead though, they don't use it. * Had our webpack-config package point to its own copy of `@babel/runtime` instead of making that a peer dep. * Jetpack's extensions tests use a ton of `@wordpress/` packages that weren't being directly depended on. Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/2234009376
We've long had pnpm's public hoisting disabled, but it also privately hoists everything into `node_modules/.pnpm/node_modules/` for compatibility with packages that have undeclared dependencies. Let's disable most of that private hoisting and see what turns up. Changes of note: * We still hoist a bunch of eslint plugins (and one prettier plugin) as untangling that mess seems like enough work to put off for later. * Only a few upstream packages have bugs that need working around: * `@mdx-js/loader`: mdx-js/mdx#2019 * `@automattic/components`: Missing dep on `@wordpress/base-styles`. And the next version will probably be unusable for us due to added `i18n-calypso`. * `@automattic/popup-monitor`: Missing dep on `events`. * markdown-it`: Missing dep on `punycode`. markdown-it/markdown-it#230 * `@samverschueren/stream-to-observable`: Outdated dep on `any-observable`. SamVerschueren/stream-to-observable#9 Hacking around that should also fix p1649254510834369-slack-CBG1CP4EN. * `git-node-fs`: Missing peer dep on `js-git`. creationix/git-node-fs#8 * `fetch-mock`'s peer dep on `node-fetch` is optional, but only because they also allow running in-browser. It's required for node. * Added `webpack-cli` alongside `webpack` everywhere to make sure p1650571211251179-slack-CBG1CP4EN is fixed. Dropped Webpack entirely from Boost instead though, they don't use it. * Had our webpack-config package point to its own copy of `@babel/runtime` instead of making that a peer dep. * Jetpack's extensions tests use a ton of `@wordpress/` packages that weren't being directly depended on. Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/2234009376
We've long had pnpm's public hoisting disabled, but it also privately hoists everything into `node_modules/.pnpm/node_modules/` for compatibility with packages that have undeclared dependencies. Let's disable most of that private hoisting and see what turns up. Changes of note: * We still hoist a bunch of eslint plugins (and one prettier plugin) as untangling that mess seems like enough work to put off for later. * Only a few upstream packages have bugs that need working around: * `@mdx-js/loader`: mdx-js/mdx#2019 * `@automattic/components`: Missing dep on `@wordpress/base-styles`. And the next version will probably be unusable for us due to added `i18n-calypso`. * `@automattic/popup-monitor`: Missing dep on `events`. * markdown-it`: Missing dep on `punycode`. markdown-it/markdown-it#230 * `@samverschueren/stream-to-observable`: Outdated dep on `any-observable`. SamVerschueren/stream-to-observable#9 Hacking around that should also fix p1649254510834369-slack-CBG1CP4EN. * `git-node-fs`: Missing peer dep on `js-git`. creationix/git-node-fs#8 * `fetch-mock`'s peer dep on `node-fetch` is optional, but only because they also allow running in-browser. It's required for node. * Added `webpack-cli` alongside `webpack` everywhere to make sure p1650571211251179-slack-CBG1CP4EN is fixed. Dropped Webpack entirely from Boost instead though, they don't use it. * Had our webpack-config package point to its own copy of `@babel/runtime` instead of making that a peer dep. * Jetpack's extensions tests use a ton of `@wordpress/` packages that weren't being directly depended on. Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/2234009376
We've long had pnpm's public hoisting disabled, but it also privately hoists everything into `node_modules/.pnpm/node_modules/` for compatibility with packages that have undeclared dependencies. Let's disable most of that private hoisting and see what turns up. Changes of note: * We still hoist a bunch of eslint plugins (and one prettier plugin) as untangling that mess seems like enough work to put off for later. * Only a few upstream packages have bugs that need working around: * `@mdx-js/loader`: mdx-js/mdx#2019 * `@automattic/components`: Missing dep on `@wordpress/base-styles`. And the next version will probably be unusable for us due to added `i18n-calypso`. * `@automattic/popup-monitor`: Missing dep on `events`. * markdown-it`: Missing dep on `punycode`. markdown-it/markdown-it#230 * `@samverschueren/stream-to-observable`: Outdated dep on `any-observable`. SamVerschueren/stream-to-observable#9 Hacking around that should also fix p1649254510834369-slack-CBG1CP4EN. * `git-node-fs`: Missing peer dep on `js-git`. creationix/git-node-fs#8 * `fetch-mock`'s peer dep on `node-fetch` is optional, but only because they also allow running in-browser. It's required for node. * Added `webpack-cli` alongside `webpack` everywhere to make sure p1650571211251179-slack-CBG1CP4EN is fixed. Dropped Webpack entirely from Boost instead though, they don't use it. * Had our webpack-config package point to its own copy of `@babel/runtime` instead of making that a peer dep. * Jetpack's extensions tests use a ton of `@wordpress/` packages that weren't being directly depended on. Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/2234009376
We've long had pnpm's public hoisting disabled, but it also privately hoists everything into `node_modules/.pnpm/node_modules/` for compatibility with packages that have undeclared dependencies. Let's disable most of that private hoisting and see what turns up. Changes of note: * We still hoist a bunch of eslint plugins (and one prettier plugin) as untangling that mess seems like enough work to put off for later. * Only a few upstream packages have bugs that need working around: * `@mdx-js/loader`: mdx-js/mdx#2019 * `@automattic/components`: Missing dep on `@wordpress/base-styles`. And the next version will probably be unusable for us due to added `i18n-calypso`. * `@automattic/popup-monitor`: Missing dep on `events`. * markdown-it`: Missing dep on `punycode`. markdown-it/markdown-it#230 * `@samverschueren/stream-to-observable`: Outdated dep on `any-observable`. SamVerschueren/stream-to-observable#9 Hacking around that should also fix p1649254510834369-slack-CBG1CP4EN. * `git-node-fs`: Missing peer dep on `js-git`. creationix/git-node-fs#8 * `fetch-mock`'s peer dep on `node-fetch` is optional, but only because they also allow running in-browser. It's required for node. * Added `webpack-cli` alongside `webpack` everywhere to make sure p1650571211251179-slack-CBG1CP4EN is fixed. Dropped Webpack entirely from Boost instead though, they don't use it. * Had our webpack-config package point to its own copy of `@babel/runtime` instead of making that a peer dep. * Jetpack's extensions tests use a ton of `@wordpress/` packages that weren't being directly depended on. Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/2234009376
We've long had pnpm's public hoisting disabled, but it also privately hoists everything into `node_modules/.pnpm/node_modules/` for compatibility with packages that have undeclared dependencies. Let's disable most of that private hoisting and see what turns up. Changes of note: * We still hoist a bunch of eslint plugins (and one prettier plugin) as untangling that mess seems like enough work to put off for later. * Only a few upstream packages have bugs that need working around: * `@mdx-js/loader`: mdx-js/mdx#2019 * `@automattic/components`: Missing dep on `@wordpress/base-styles`. And the next version will probably be unusable for us due to added `i18n-calypso`. * `@automattic/popup-monitor`: Missing dep on `events`. * markdown-it`: Missing dep on `punycode`. markdown-it/markdown-it#230 * `@samverschueren/stream-to-observable`: Outdated dep on `any-observable`. SamVerschueren/stream-to-observable#9 Hacking around that should also fix p1649254510834369-slack-CBG1CP4EN. * `git-node-fs`: Missing peer dep on `js-git`. creationix/git-node-fs#8 * `fetch-mock`'s peer dep on `node-fetch` is optional, but only because they also allow running in-browser. It's required for node. * Added `webpack-cli` alongside `webpack` everywhere to make sure p1650571211251179-slack-CBG1CP4EN is fixed. Dropped Webpack entirely from Boost instead though, they don't use it. * Had our webpack-config package point to its own copy of `@babel/runtime` instead of making that a peer dep. * Jetpack's extensions tests use a ton of `@wordpress/` packages that weren't being directly depended on. Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/2234009376
We've long had pnpm's public hoisting disabled, but it also privately hoists everything into `node_modules/.pnpm/node_modules/` for compatibility with packages that have undeclared dependencies. Let's disable most of that private hoisting and see what turns up. Changes of note: * We still hoist a bunch of eslint plugins (and one prettier plugin) as untangling that mess seems like enough work to put off for later. * Only a few upstream packages have bugs that need working around: * `@mdx-js/loader`: mdx-js/mdx#2019 * `@automattic/components`: Missing dep on `@wordpress/base-styles`. And the next version will probably be unusable for us due to added `i18n-calypso`. * `@automattic/popup-monitor`: Missing dep on `events`. * markdown-it`: Missing dep on `punycode`. markdown-it/markdown-it#230 * `@samverschueren/stream-to-observable`: Outdated dep on `any-observable`. SamVerschueren/stream-to-observable#9 Hacking around that should also fix p1649254510834369-slack-CBG1CP4EN. * `git-node-fs`: Missing peer dep on `js-git`. creationix/git-node-fs#8 * `fetch-mock`'s peer dep on `node-fetch` is optional, but only because they also allow running in-browser. It's required for node. * Added `webpack-cli` alongside `webpack` everywhere to make sure p1650571211251179-slack-CBG1CP4EN is fixed. Dropped Webpack entirely from Boost instead though, they don't use it. * Had our webpack-config package point to its own copy of `@babel/runtime` instead of making that a peer dep. * Jetpack's extensions tests use a ton of `@wordpress/` packages that weren't being directly depended on.
Initial checklist
Affected packages and versions
1.6.22
Link to runnable example
No response
Steps to reproduce
pnpm install && pnpm build
yarn set version stable && yarn install && yarn build
yarn install --pnp && yarn build
The problem seems to be that
mdx/packages/loader/index.js
Lines 4 to 7 in c91b00c
assumes that
@mdx-js/react
will have been hoisted into the project's node_modules directory so webpack can find it when processing the transformed file later. Changing that tomakes it work (at least in pnpm).
I note this problem doesn't seem to occur with version 2.0.0 or later. However, I'm not using
@mdx-js/loader
directly, I'm using it via@storybook/addon-docs
which still depends on@mdx-js/loader
^1.6.22
, so updating to v2 is not currently an option.Expected behavior
Project should build without error.
Actual behavior
Build fails with this error
Runtime
Node v16
Package manager
yarn v3, yarn v1, pnpm
OS
Linux
Build and bundle tools
webpack
The text was updated successfully, but these errors were encountered: