-
Notifications
You must be signed in to change notification settings - Fork 70
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
rpt2 does not resolve pnpm symlinked dependencies #234
Comments
UpdateAccording to this comment in the However, none of the provided solutions will work in this case. // include the actual pnpm registry path
commonjs({ include: '../../node_modules/.pnpm/registry.npmjs.org/**' })
// or set the following option in rollup.config.js
preserveSymlinks: true |
I've been looking at the code and I'm mystified. Leaving more info here for myself and other passing-by folks:
rollup-plugin-typescript2/src/index.ts Lines 160 to 162 in 428140b
Based on the above, I cannot see any combination of options and/or plugins that will correctly resolve |
I'm starting to suspect this is not an issue with rpt2, despite what the error says, but rather a problem that's propagating upstream. Closing until I have more information. |
Any updates on this? I'm trying to bundle a react app with rollup and the original I got the following error specifically:
|
Thing is, it works fine with the original ts plugin before I had debug failure errors, and running tsc by itself works fine as well. |
@davelsan @creepinson I think this issue should be opened again for further discussion. thank you. |
Hi @beetaa. Thanks for your interest in this issue. I have updated the original repro and I can confirm the issue is still there. I'm re-opening the discussion as per your request. |
So you are saying rpt2 should pass |
I got the same problem in my project with pnpm. rollup-plugin-typescript2/src/tscache.ts Lines 63 to 75 in 428140b
for examples,
As you see, the real path of vue in demo should be
I wonder if there is any way to solve this problem. |
Any news?
|
This comment was marked as spam.
This comment was marked as spam.
@rollup/plugin-typescript solve this. |
rollup-plugin-ts works too and also exports compiled d.ts typings without much of a hassle. |
Fixed the issue!So I believe I've found a fix for this long-standing issue! See #332 Notes on root cause analysis / debuggingRed herring to look at
|
Relatedly (but different root cause), I investigated #295 more after solving this issue and stepped through the resolution logic therein. So not just a red herring, the |
Released in 0.32.0 🎉 |
What happens and why it is wrong
When trying to build a project installed with
pnpm
,rpt2
fails to resolve the created symlinked dependencies innode_modules
(non-flat).Setting
check: false
is (arguably) a workaround.Related issues: #188, #214
Reproduction
Repository: https://github.com/davelsan/rpt2-pnpm-symlinks
Config: https://github.com/davelsan/rpt2-pnpm-symlinks/blob/master/rollup.config.js
The provided repro is a minimal
vue3
plugin that imports theApp
interface fromvue
inindex.ts
This import causes the following error on build:
Setting the
check
option tofalse
inrollup.config.js
eliminates the error.Versions
rollup.config.js
tsconfig.json
A snippet with the relevant module resolution options only.
package.json
A snippet with the relevant dependencies only.
The text was updated successfully, but these errors were encountered: