Skip to content

Yizack/nuxthub-reproduction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

After installing @nuxthub/core 0.10.5 there's a confusing cycle of TypeScript errors that keeps alternating between two different problems depending on which command you run.

Steps to reproduce Steps to reproduce the behavior:

  1. Clone: https://github.com/Yizack/nuxthub-reproduction
  2. Fresh install, run pnpm i (which runs prepare) → vue-tsc -b --noEmit
    • db auto-import has no types
    • ❌ Non-relative path errors in .nuxt/tsconfig.app.json and .nuxt/tsconfig.shared.json:
  3. Run pnpm dev wait, stop it, then run vue-tsc -b --noEmit again
    • db is now typed correctly
    • ❌ Non-relative path errors still present
  4. Run pnpm postinstall (which runs prepare) again → vue-tsc -b --noEmit
    • db loses its types again
    • ✅ Non-relative path errors disappear

Example of Logs

Step 2
npx vue-tsc -b --noEmit
.nuxt/tsconfig.app.json:101:9 - error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?

101         "@nuxthub/db"
 you forget a leading './'?

116         "@nuxthub/db/schema"
            ~~~~~~~~~~~~~~~~~~~~

server/api/users.get.ts:4:21 - error TS7006: Parameter 'user' implicitly has an 'any' type.

4   return users.map((user) => ({
                      ~~~~

.nuxt/tsconfig.shared.json:101:9 - error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?       

101         "@nuxthub/db"
            ~~~~~~~~~~~~~

.nuxt/tsconfig.shared.json:116:9 - error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?       

116         "@nuxthub/db/schema"
            ~~~~~~~~~~~~~~~~~~~~


Found 5 errors.
Step 3
npx vue-tsc -b --noEmit
.nuxt/tsconfig.app.json:101:9 - error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?

101         "@nuxthub/db"
            ~~~~~~~~~~~~~

.nuxt/tsconfig.app.json:116:9 - error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?

116         "@nuxthub/db/schema"
            ~~~~~~~~~~~~~~~~~~~~

.nuxt/tsconfig.shared.json:101:9 - error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?

101         "@nuxthub/db"
            ~~~~~~~~~~~~~

.nuxt/tsconfig.shared.json:116:9 - error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?

116         "@nuxthub/db/schema"
            ~~~~~~~~~~~~~~~~~~~~


Found 4 errors.
Step 4
server/api/users.get.ts:4:21 - error TS7006: Parameter 'user' implicitly has an 'any' type.

4   return users.map((user) => ({
                      ~~~~

server/api/users.get.ts:4:21 - error TS7006: Parameter 'user' implicitly has an 'any' type.

4   return users.map((user) => ({
                      ~~~~


Found 2 errors.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors