Skip to content

Cannot create React MFE using create-single-spa #444

@webJose

Description

@webJose

The following is the verbatim console with my inputs and all the output:

PS C:\Users\webJo\src> npm create single-spa
Need to install the following packages:
create-single-spa@5.0.7
Ok to proceed? (y)

npm warn deprecated debuglog@1.0.1: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated readdir-scoped-modules@1.1.0: This functionality has been moved to @npmcli/fs
npm warn deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
npm warn deprecated read-package-json@6.0.4: This package is no longer supported. Please use @npmcli/package-json instead.
npm warn deprecated npmlog@5.0.1: This package is no longer supported.
npm warn deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs
npm warn deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs
npm warn deprecated npmlog@6.0.2: This package is no longer supported.
npm warn deprecated npmlog@6.0.2: This package is no longer supported.
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@8.1.0: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@8.1.0: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated are-we-there-yet@2.0.0: This package is no longer supported.
npm warn deprecated are-we-there-yet@3.0.1: This package is no longer supported.
npm warn deprecated are-we-there-yet@3.0.1: This package is no longer supported.
npm warn deprecated gauge@4.0.4: This package is no longer supported.
npm warn deprecated gauge@4.0.4: This package is no longer supported.
npm warn deprecated gauge@3.0.2: This package is no longer supported.

> npx
> create-single-spa

(node:35836) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
? Directory for new project csspaTest
? Select type to generate single-spa application / parcel
? Which framework do you want to use? react
? Which package manager do you want to use? npm
? Will this project use Typescript? Yes
? What module format should this microfrontend be bundled to? esm
? Organization name (can use letters, numbers, dash or underscore) create-sspa
? Project name (can use letters, numbers, dash or underscore) mfe1
Initialized empty Git repository in C:/Users/webJo/src/csspaTest/.git/

Initialized git repository

   create csspaTest\package.json
   create csspaTest\jest.config.js
   create csspaTest\babel.config.json
   create csspaTest\.eslintrc
   create csspaTest\.gitignore
   create csspaTest\.husky\pre-commit
   create csspaTest\src\declarations.d.ts
   create csspaTest\.prettierignore
   create csspaTest\webpack.config.js
   create csspaTest\src\root.component.tsx
   create csspaTest\src\root.component.test.tsx
   create csspaTest\src\create-sspa-mfe1.tsx
   create csspaTest\tsconfig.json

No change to package.json was detected. No package manager install will be executed.


I'm all done. Running npm install for you to install the required dependencies. If this fails, try running the command yourself.


npm warn config cache-min This option has been deprecated in favor of `--prefer-offline`.
npm error code ETARGET
npm error notarget No matching version found for @babel/eslint-parser@^7.23.3.
npm error notarget In most cases you or one of your dependencies are requesting
npm error notarget a package version that doesn't exist.
npm error A complete log of this run can be found in: C:\Users\webJo\AppData\Local\npm-cache\_logs\2025-02-24T22_03_25_270Z-debug-0.log
Project setup complete!
Steps to test your React single-spa application:
1. Run 'npm start -- --port 8500'
2. Go to http://single-spa-playground.org/playground/instant-test?name=@create-sspa/mfe1&url=8500 to see it working!

As suggested, I tried running npm install myself:

PS C:\Users\webJo\src> cd .\csspaTest\
PS C:\Users\webJo\src\csspaTest> npm install
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @testing-library/react@16.2.0
npm error Found: @types/react@17.0.83
npm error node_modules/@types/react
npm error   @types/react@"^17.0.19" from the root project
npm error   peer @types/react@"^17.0.0" from @types/react-dom@17.0.26
npm error   node_modules/@types/react-dom
npm error     @types/react-dom@"^17.0.9" from the root project
npm error     peerOptional @types/react-dom@"*" from single-spa-react@6.0.2
npm error     node_modules/single-spa-react
npm error       single-spa-react@"^6.0.2" from the root project
npm error   1 more (single-spa-react)
npm error
npm error Could not resolve dependency:
npm error peerOptional @types/react@"^18.0.0 || ^19.0.0" from @testing-library/react@16.2.0
npm error node_modules/@testing-library/react
npm error   dev @testing-library/react@"^16.0.1" from the root project
npm error
npm error Conflicting peer dependency: @types/react@19.0.10
npm error node_modules/@types/react
npm error   peerOptional @types/react@"^18.0.0 || ^19.0.0" from @testing-library/react@16.2.0
npm error   node_modules/@testing-library/react
npm error     dev @testing-library/react@"^16.0.1" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error C:\Users\webJo\AppData\Local\npm-cache\_logs\2025-02-24T22_05_05_528Z-eresolve-report.txt
npm error A complete log of this run can be found in: C:\Users\webJo\AppData\Local\npm-cache\_logs\2025-02-24T22_05_05_528Z-debug-0.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions