Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating to single-spa-layout 2.1.0 causing errors when checking types #380

Open
jhdielman opened this issue Jun 2, 2023 · 0 comments
Open

Comments

@jhdielman
Copy link

Hi all! Getting an error on the npm run build:types (tsc) stage of the build process. I set up the root-config project using create-single-spa. I then updated single-spa-layout to "^2.1.0" and ran npm run build .

Steps to reproduce

  1. Create root-config project by running creat-single-spa
  2. Select root-config
  3. Confirm the project will use TypeScript
  4. Confirm the project will use single-spa-layout
  5. Delete node_modules and package-lock.json
  6. After the project is created, update single-spa-layout to version 2.1.0
  7. Run npm i
  8. Run npm run build

Error

[build:*types] node_modules/single-spa-layout/dist/types/browser/constructApplications.d.ts(36,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type.
[build:*types] node_modules/single-spa-layout/dist/types/browser/constructApplications.d.ts(36,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
[build:*types] node_modules/single-spa-layout/dist/types/isomorphic/constructRoutes.d.ts(74,81): error TS2694: Namespace '"/Users/jason.dielman/bx/codebase/platform-ui-host/node_modules/@types/parse5/index"' has no exported member 'DefaultTreeDocument'.
[build:*types] node_modules/single-spa-layout/node_modules/single-spa/typings/single-spa.d.ts(1,1): error TS6200: Definitions of the following identifiers conflict with those in another file: CustomPropsFn, AppProps, ParcelConfig, ParcelProps, ParcelConfigObject, Parcel, LifeCycleFn, LifeCycles, StartOpts, Application, ActivityFn, Activity, RegisterApplicationConfig, SingleSpaCustomEventDetail, NOT_LOADED, LOADING_SOURCE_CODE, NOT_BOOTSTRAPPED, BOOTSTRAPPING, NOT_MOUNTED, MOUNTING, MOUNTED, UPDATING, UNMOUNTING, UNLOADING, SKIP_BECAUSE_BROKEN, LOAD_ERROR, AppError
[build:*types] node_modules/single-spa-layout/node_modules/single-spa/typings/single-spa.d.ts(3,5): error TS2374: Duplicate index signature for type 'string'.
[build:*types] node_modules/single-spa-layout/node_modules/single-spa/typings/single-spa.d.ts(4,5): error TS2374: Duplicate index signature for type 'number'.
[build:*types] node_modules/single-spa-layout/node_modules/single-spa/typings/single-spa.d.ts(98,5): error TS2374: Duplicate index signature for type 'string'.
[build:*types] node_modules/single-spa-layout/node_modules/single-spa/typings/single-spa.d.ts(105,5): error TS2717: Subsequent property declarations must have the same type.  Property '[MOUNTED]' must be of type '[]', but here has type 'string[]'.
[build:*types] node_modules/single-spa-layout/node_modules/single-spa/typings/single-spa.d.ts(106,5): error TS2717: Subsequent property declarations must have the same type.  Property '[NOT_MOUNTED]' must be of type '[]', but here has type 'string[]'.
[build:*types] node_modules/single-spa-layout/node_modules/single-spa/typings/single-spa.d.ts(107,5): error TS2717: Subsequent property declarations must have the same type.  Property '[NOT_LOADED]' must be of type '[]', but here has type 'string[]'.
[build:*types] node_modules/single-spa-layout/node_modules/single-spa/typings/single-spa.d.ts(108,5): error TS2717: Subsequent property declarations must have the same type.  Property '[SKIP_BECAUSE_BROKEN]' must be of type '[]', but here has type 'string[]'.
[build:*types] node_modules/single-spa/typings/single-spa.d.ts(1,1): error TS6200: Definitions of the following identifiers conflict with those in another file: CustomPropsFn, AppProps, ParcelConfig, ParcelProps, ParcelConfigObject, Parcel, LifeCycleFn, LifeCycles, StartOpts, Application, ActivityFn, Activity, RegisterApplicationConfig, SingleSpaCustomEventDetail, NOT_LOADED, LOADING_SOURCE_CODE, NOT_BOOTSTRAPPED, BOOTSTRAPPING, NOT_MOUNTED, MOUNTING, MOUNTED, UPDATING, UNMOUNTING, UNLOADING, SKIP_BECAUSE_BROKEN, LOAD_ERROR, AppError
[build:*types] node_modules/single-spa/typings/single-spa.d.ts(3,5): error TS2374: Duplicate index signature for type 'string'.
[build:*types] node_modules/single-spa/typings/single-spa.d.ts(4,5): error TS2374: Duplicate index signature for type 'number'.
[build:*types] node_modules/single-spa/typings/single-spa.d.ts(139,5): error TS2374: Duplicate index signature for type 'string'.
[build:*types] npm run build:types exited with code 2

Trying to dive into this a bit more, but if anyone has run into this in the meantime any help is very much appreciated 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant