BuilderIO / framework-benchmarks

Test each framework for it's performance cost
476 stars 22 forks source link

npm run build - Failing with a type error #4

Closed bebraw closed 2 years ago

bebraw commented 2 years ago

Here's what I did:

  1. I made sure I'm using Node 16 with nvm (it would be cool if you could fix the exact version of Node this way)
  2. npm install
  3. npm run install
  4. cd apps/components
  5. npm install
  6. npm run build
  7. cd ../.. - Back to project root
  8. npm run build

It's compiling a lot and then failing with this:

Error: src/app/generated-components/components/todo-item.ts:5:9 - error TS2304: Cannot find name 'Todo'.

5   item: Todo;
          ~~~~

It's possible I'm missing something obvious.

It looks like that as a side effect of those npm installs, it modified package locks:

> git st                                                  ✔  4s  16.15.0 Node
On branch main
Your branch is up to date with 'origin/main'.

Changes not staged for commit:
    modified:   frameworks/astro/package-lock.json
    modified:   frameworks/next/package-lock.json
    modified:   frameworks/next/yarn.lock
    modified:   frameworks/nuxt3/package-lock.json
    modified:   frameworks/solid/package-lock.json
    modified:   frameworks/svelte/package-lock.json

Untracked files:
    frameworks/fresh/package-lock.json

That might have something to do with the failure case.

ChrisLaRocque commented 2 years ago

+1 for this. Looks like the Angular generated todo-item isn't importing the type for Todo

steve8708 commented 2 years ago

thanks for reporting @bebraw, just pushed the fix!