blitz-js / blitz-js/legacy-framework

Jetbrains auto-import for the Routes object gives the wrong path.

Open
#27 1 comment 0 reactions 0 assignees View on GitHub
kind/bug legacy-framework status/ready-to-work-on
Dominant language
JavaScript
Stars
3
Forks
2
PR merge metrics
No merged PRs in 30d

Description

### What is the problem?

Very low priority, but kinda interesting.

Jetbrains gives the wrong path when trying to auto-import `Routes`.
VSCode gives two paths, one of them correct, but still it would nice not to have the second (wrong) path.

It must be because it's generated, but Prisma objects seem to import fine.

Jetbrains
![Screen Shot 2021-06-22 at 09 59 39](https://user-images.githubusercontent.com/8725423/122938345-ad12f300-d340-11eb-9598-6e546a773b28.png)

VSCode
![Screen Shot 2021-06-22 at 10 01 13](https://user-images.githubusercontent.com/8725423/122938479-c9169480-d340-11eb-85f6-da226cf96041.png)

### Paste all your error logs here:

n/a

### Paste all relevant code snippets here:

n/a

### What are detailed steps to reproduce this?

1. Types Routes in a Jetbrains IDE
2. Try to auto-import

### Run `blitz -v` and paste the output here:

```
macOS Big Sur | darwin-x64 | Node: v14.16.1

blitz: 0.38.1 (global)
blitz: 0.38.1 (local)

Package manager: yarn
System:
OS: macOS 11.4
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Memory: 19.44 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.16.1 - /var/folders/6f/xtx4d86j6vz71z0cdx3kt3400000gq/T/fnm_multishells/21467_1624144061381/bin/node
Yarn: 1.22.10 - /var/folders/6f/xtx4d86j6vz71z0cdx3kt3400000gq/T/fnm_multishells/21467_1624144061381/bin/yarn
npm: 7.12.0 - /var/folders/6f/xtx4d86j6vz71z0cdx3kt3400000gq/T/fnm_multishells/21467_1624144061381/bin/npm
Watchman: Not Found
npmPackages:
@prisma/client: 2.25.0 => 2.25.0
blitz: 0.38.1 => 0.38.1
prisma: 2.25.0 => 2.25.0
react: alpha => 18.0.0-alpha-43f4cc160
react-dom: alpha => 18.0.0-alpha-43f4cc160
typescript: 4.3.4 => 4.3.4
```

### Please include below any other applicable logs and screenshots that show your problem:

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.