single-spa / create-single-spa

https://single-spa.js.org/docs/create-single-spa
Other
128 stars 60 forks source link

Gives error when creating an angular project #370

Open Deval99 opened 1 year ago

Deval99 commented 1 year ago

Error

Error: node_modules/single-spa-angular/src/public_api.d.ts:2:34 - error TS2307: Cannot find module './single-spa-angular' or its corresponding type declarations.

Error: src/main.single-spa.ts:18:22 - error TS7006: Parameter 'singleSpaProps' implicitly has an 'any' type. 18 bootstrapFunction: singleSpaProps => {

2 export { singleSpaAngular } from './single-spa-angular';

Temporary solution

edit APP_PATH/node_modules/single-spa-angular/src/public_api.d.ts

replace export { singleSpaAngular } from './single-spa-angular'; with export { singleSpaAngular } from './index';

Steps to reproduce the error

$ create-single-spa Directory . Select: single-spa application / parcel Select: angular Assign name Add angular routing Select SCSS Allow installing single-spa-angular@8.0.0 Add angular routing Select default port $ //Go to application folder $ npm start