Home App Docs Blog Github

Package error when adding Builder to my Angular app

I can’t seem to get my Builder Section into my angular app. What am I doing wrong?

Builder content link

Builder public api key

Detailed steps to reproduce the bug

  1. Generated a clean new app with Angular 11 and the ng new command. I added routing and css.
  2. Followed the steps on the Builder GitHub of angular:
    - npm install @builder.io/angular
    - added the code to my module and in a component
  3. npm start

Code stack you are integrating Builder with
Angular 11

Reproducible code example
My errors:

Error: node_modules/@builder.io/angular/app/modules/builder/services/builder.service.d.ts:3:35 - error TS7016: Could not find a declaration file for module 'express'. 'C://Documents/GitHub/builder-test/node_modules/express/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/express` if it exists or add a new declaration (.d.ts) file containing `declare module 'express';`

3 import { Request, Response } from 'express';

Error: ./node_modules/@builder.io/angular/__ivy_ngcc__/fesm2015/builder.io-angular.js
Module not found: Error: Can't resolve '@angular/elements' in 'C\Documents\GitHub\builder-test\node_modules\@builder.io\angular\__ivy_ngcc__\fesm2015'

Hi Daniel, we have a starter you can find here that uses Angular 11 and may help with your setup. If you’re still having issues could you please share your code with a Stackblitz that reproduces the error?