Skip to content
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

Possible alias collisions with $internal/paths after 1.4.0+ (#8838) #9009

Closed
jrmoynihan opened this issue Feb 12, 2023 · 0 comments · Fixed by #9022
Closed

Possible alias collisions with $internal/paths after 1.4.0+ (#8838) #9009

jrmoynihan opened this issue Feb 12, 2023 · 0 comments · Fixed by #9022

Comments

@jrmoynihan
Copy link

jrmoynihan commented Feb 12, 2023

Describe the bug

Upon building my app, this error is thrown both locally, and by Vercel's build process:

Error: Could not load /vercel/path0/src/lib/internal/paths (imported by node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@sveltejs/kit/src/runtime/server/respond.js): ENOENT: no such file or directory, open '/vercel/path0/src/lib/internal/paths'

The import is performed here:
CleanShot 2023-02-11 at 20 56 04@2x

Which traces back to this type declaration:
CleanShot 2023-02-11 at 20 56 59@2x

I have an alias in my SvelteKit package's project to $internal which I think conflicts with the changes made by @benmccann in #8838 ?

I can rename my alias to solve the problem, but I think this could pop up again for any other library author using that naming scheme in their aliases. It might be worth reverting to the actual paths rather than the aliased ones, or using something more unlikely to have conflicts like e.g. $$internal_.

Reproduction

Provide an alias named $internal to config.kit.alias within a SvelteKit project. Run vite build.

Logs

No response

System Info

System:
    OS: macOS 12.6.2
    CPU: (10) arm64 Apple M1 Max
    Memory: 137.69 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.13.0 - ~/.nvm/versions/node/v18.13.0/bin/node
    npm: 8.19.3 - ~/.nvm/versions/node/v18.13.0/bin/npm
  Browsers:
    Chrome: 109.0.5414.119
    Firefox Developer Edition: 109.0
    Safari: 16.2
  npmPackages:
    @sveltejs/adapter-auto: ^2.0.0 => 2.0.0 
    @sveltejs/kit: ^1.5.5 => 1.5.5 
    @sveltejs/package: ^1.0.2 => 1.0.2 
    svelte: ^3.55.1 => 3.55.1 
    vite: ^4.1.1 => 4.1.1

Severity

serious, but I can work around it

Additional Information

Solved by changing the $internal alias used within my own project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant