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
I have recently updated a Vue library source code to use yarn 4.3.0, which uses PnP logic instead of the classic node_modules approach. Serving works just fine, as well as a separate Storybook build and deployment I have running (which doesn't use dts).
The error i get is that when vite starts rolling up the declaration files, i get the following error:
[vite:dts] Start generate declaration files...
computing gzip size (134)...[vite:dts] Start rollup declaration files...
Analysis will use the bundled TypeScript version 5.3.3
x Build failed in 11.03s
error during build:
Error: [vite:dts] ENOTDIR: not a directory, lstat '/node_modules/@vue/runtime-core/dist/runtime-core.d.ts/package.json'
at makeError$1 (/home/alfonso/Tether/frontend/design-system-vue/.pnp.cjs:16318:24)
at ENOTDIR (/home/alfonso/Tether/frontend/design-system-vue/.pnp.cjs:16336:10)
at ZipFS.resolveFilename (/home/alfonso/Tether/frontend/design-system-vue/.pnp.cjs:20986:15)
at ZipFS.realpathSync (/home/alfonso/Tether/frontend/design-system-vue/.pnp.cjs:20777:28)
at /home/alfonso/Tether/frontend/design-system-vue/.pnp.cjs:18298:102
at /home/alfonso/Tether/frontend/design-system-vue/.pnp.cjs:18812:66
at ZipOpenFS.getMountSync (/home/alfonso/Tether/frontend/design-system-vue/.pnp.cjs:18919:14)
at ZipOpenFS.makeCallSync (/home/alfonso/Tether/frontend/design-system-vue/.pnp.cjs:18812:17)
at ZipOpenFS.realpathSync (/home/alfonso/Tether/frontend/design-system-vue/.pnp.cjs:18290:17)
at VirtualFS.realpathSync (/home/alfonso/Tether/frontend/design-system-vue/.pnp.cjs:18990:26)
What seems extremely weird is that it's trying to get a file with the structure node_modules/<library>/dist/<types file .d.ts>/package.json
Upon further inspection, I logged the process used to resolve all paths, and got the following:
# ... (previous logs)
🚀 [TDS] ~ ZipFS ~ realpathSync ~ resolvedP: /node_modules/vite/client.d.ts
🚀 [TDS] ~ ZipFS ~ realpathSync ~ p : /node_modules/vue/dist/vue.d.mts
🚀 [TDS] ~ ZipFS ~ realpathSync ~ resolvedP: /node_modules/vue/dist/vue.d.mts
🚀 [TDS] ~ ZipFS ~ realpathSync ~ p : /node_modules/vite/client.d.ts
🚀 [TDS] ~ ZipFS ~ realpathSync ~ resolvedP: /node_modules/vite/client.d.ts
# HEre im guessing starts the rollup
Analysis will use the bundled TypeScript version 5.3.3
🚀 [TDS] ~ ZipFS ~ realpathSync ~ p : /node_modules/typescript
🚀 [TDS] ~ ZipFS ~ realpathSync ~ resolvedP: /node_modules/typescript
🚀 [TDS] ~ ZipFS ~ realpathSync ~ p : /node_modules/typescript/lib
🚀 [TDS] ~ ZipFS ~ realpathSync ~ resolvedP: /node_modules/typescript/lib
🚀 [TDS] ~ ZipFS ~ realpathSync ~ p : /node_modules/typescript
🚀 [TDS] ~ ZipFS ~ realpathSync ~ resolvedP: /node_modules/typescript
🚀 [TDS] ~ ZipFS ~ realpathSync ~ p : /node_modules/typescript/lib/typescript.js
🚀 [TDS] ~ ZipFS ~ realpathSync ~ resolvedP: /node_modules/typescript/lib/typescript.js
🚀 [TDS] ~ ZipFS ~ realpathSync ~ p : /node_modules/typescript/lib/typescript.js/package.json
🚀 [TDS] ~ ZipFS ~ realpathSync ~ p : /node_modules/@vue/runtime-core/dist/runtime-core.d.ts/package.json
x Build failed in 9.83s
error during build:
Error: [vite:dts] ENOTDIR: not a directory, lstat '/node_modules/@vue/runtime-core/dist/runtime-core.d.ts/package.json'
at makeError$1 (/home/alfonso/Tether/frontend/design-system-vue/.pnp.cjs:16317:24)
at ENOTDIR (/home/alfonso/Tether/frontend/design-system-vue/.pnp.cjs:16335:10)
at ZipFS.resolveFilename (/home/alfonso/Tether/frontend/design-system-vue/.pnp.cjs:20954:15)
at ZipFS.realpathSync (/home/alfonso/Tether/frontend/design-system-vue/.pnp.cjs:20743:28)
at /home/alfonso/Tether/frontend/design-system-vue/.pnp.cjs:18279:102
at /home/alfonso/Tether/frontend/design-system-vue/.pnp.cjs:18779:66
at ZipOpenFS.getMountSync (/home/alfonso/Tether/frontend/design-system-vue/.pnp.cjs:18886:14)
at ZipOpenFS.makeCallSync (/home/alfonso/Tether/frontend/design-system-vue/.pnp.cjs:18779:17)
at ZipOpenFS.realpathSync (/home/alfonso/Tether/frontend/design-system-vue/.pnp.cjs:18271:17)
at VirtualFS.realpathSync (/home/alfonso/Tether/frontend/design-system-vue/.pnp.cjs:18957:26)
Describe the bug
Hello!
I have recently updated a Vue library source code to use yarn 4.3.0, which uses PnP logic instead of the classic node_modules approach. Serving works just fine, as well as a separate Storybook build and deployment I have running (which doesn't use dts).
The error i get is that when vite starts rolling up the declaration files, i get the following error:
What seems extremely weird is that it's trying to get a file with the structure
node_modules/<library>/dist/<types file .d.ts>/package.json
Upon further inspection, I logged the process used to resolve all paths, and got the following:
Reproduction
https://github.com/auirarrazaval/rollup-rep
Steps to reproduce
Clone the repo, ensure you have yarn 4:
And build
yarn build
System Info
Validations
The text was updated successfully, but these errors were encountered: