question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot find module './$types' for routes with a leading dot like .well-known

See original GitHub issue

Describe the bug

For example a route like “/.well-known/change-password” (for password managers) will generate in the editor the error:

Cannot find module ‘./$types’ or its corresponding type declarations.ts(2307)

Reproduction

repo https://github.com/fcrozatier/kit_dot_routes

Logs

No response

System Info

System:
    OS: macOS 11.7.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 15.09 GB / 32.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 19.0.1 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.19.2 - /usr/local/bin/npm
  Browsers:
    Brave Browser: 107.1.45.123
    Chrome: 107.0.5304.110
    Firefox: 105.0.1
    Firefox Developer Edition: 107.0
    Safari: 16.1
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.87 
    @sveltejs/kit: next => 1.0.0-next.546 
    svelte: ^3.44.0 => 3.53.1 
    vite: ^3.0.4 => 3.2.3

Severity

annoyance

Additional Information

No response

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Conduitrycommented, Nov 15, 2022

Could [x+2e]well-known be a possible workaround now with the new path escaping thing https://kit.svelte.dev/docs/advanced-routing#encoding ?

0reactions
dummdidummcommented, Nov 16, 2022

I tried that out but it doesn’t seem to work in combination with rootdirs

Read more comments on GitHub >

github_iconTop Results From Across the Web

Typescript doesn't resolve properly the dynamic routes module
Typescript complains about import * as Routes from 'routes.js.erb'. After setting up js-routes, when I run yarn run tsc -p tsconfig.json ...
Read more >
Node error: "Cannot find module 'routes'" - Stack Overflow
js file, I think I understand why I'm getting the error - the routes = require('./routes'), statement seems to be requiring a module...
Read more >
Google Groups
Error: Cannot find module '. ... hi, so im new to express.js and i am writing my app on top of the socket.io...
Read more >
r/node - Reddit
I am getting error Error: Cannot find module './routes' when creating a whatsapp bot with node.js and twilio ... Can you post your...
Read more >
Can't find module using absolute path - help - Meteor forums
Error: Cannot find module '/imports/startup/client/routes.js' at makeMissingError (packages\modules-runtime.js:231:12) at require ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found