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

Build fails after last update (5.1.0) #173

Closed
ShakMR opened this issue Jun 16, 2023 · 14 comments
Closed

Build fails after last update (5.1.0) #173

ShakMR opened this issue Jun 16, 2023 · 14 comments

Comments

@ShakMR
Copy link

ShakMR commented Jun 16, 2023

After updating 1 hour ago we started getting this error in the build step.

Module not found: Error: Can't resolve 'single-spa-react' in 'project/src'
resolve 'single-spa-react' in 'project/src'
  Parsed request is a module
  using description file: project/package.json (relative path: ./src)
    Field 'browser' doesn't contain a valid alias configuration
    resolve as module
      project/src/node_modules doesn't exist or is not a directory
      looking for modules in project/node_modules
        single file module
          using description file: project/package.json (relative path: ./node_modules/single-spa-react)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              project/node_modules/single-spa-react is not a file
            .mjs
              Field 'browser' doesn't contain a valid alias configuration
              project/node_modules/single-spa-react.mjs doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              project/node_modules/single-spa-react.js doesn't exist
            .jsx
              Field 'browser' doesn't contain a valid alias configuration
              project/node_modules/single-spa-react.jsx doesn't exist
            .wasm
              Field 'browser' doesn't contain a valid alias configuration
              project/node_modules/single-spa-react.wasm doesn't exist
            .json
              Field 'browser' doesn't contain a valid alias configuration
              project/node_modules/single-spa-react.json doesn't exist
        existing directory project/node_modules/single-spa-react
          using description file: project/node_modules/single-spa-react/package.json (relative path: .)
            using exports field: ./lib/esm/single-spa-react.js
              using description file: project/node_modules/single-spa-react/package.json (relative path: ./lib/esm/single-spa-react.js)
                no extension
                  Field 'browser' doesn't contain a valid alias configuration
                  project/node_modules/single-spa-react/lib/esm/single-spa-react.js doesn't exist
                .mjs
                  Field 'browser' doesn't contain a valid alias configuration
                  project/node_modules/single-spa-react/lib/esm/single-spa-react.js.mjs doesn't exist
                .js
                  Field 'browser' doesn't contain a valid alias configuration
                  project/node_modules/single-spa-react/lib/esm/single-spa-react.js.js doesn't exist
                .jsx
                  Field 'browser' doesn't contain a valid alias configuration
                  project/node_modules/single-spa-react/lib/esm/single-spa-react.js.jsx doesn't exist
                .wasm
                  Field 'browser' doesn't contain a valid alias configuration
                  project/node_modules/single-spa-react/lib/esm/single-spa-react.js.wasm doesn't exist
                .json
                  Field 'browser' doesn't contain a valid alias configuration
                  project/node_modules/single-spa-react/lib/esm/single-spa-react.js.json doesn't exist
                as directory
                  project/node_modules/single-spa-react/lib/esm/single-spa-react.js doesn't exist
      /Users/ikea-boari/Projects/IKEA/mfe/node_modules doesn't exist or is not a directory
      /Users/ikea-boari/Projects/IKEA/node_modules doesn't exist or is not a directory
      /Users/ikea-boari/Projects/node_modules doesn't exist or is not a directory
      /Users/ikea-boari/node_modules doesn't exist or is not a directory
      /Users/node_modules doesn't exist or is not a directory
      /node_modules doesn't exist or is not a directory

webpack 5.87.0 compiled with 1 error in 2382 ms
@marcosgilf
Copy link

The package seems to have an error in the publish step. The generated code in node_modules is not complete:
single-spa-react-output

@alanmatiasdev
Copy link

I also faced this error. Version 5.1.0 only includes library typing.

Screenshot 2023-06-21 at 10 34 45

@lhtdesignde
Copy link

Getting the same error after upgrading. node_modules missing?

@abhinavairi
Copy link

The package seems to have an error in the publish step. The generated code in node_modules is not complete: single-spa-react-output

In all package versions i.e. ^5.0.0, ^5.0.1, ^5.0.2 and ^5.1.0 after installing it doesn't include lib and parcel folder. Have to downgrade to ^4.6.1 to make it work in application.

@alanmatiasdev
Copy link

The package seems to have an error in the publish step. The generated code in node_modules is not complete: single-spa-react-output

In all package versions i.e. ^5.0.0, ^5.0.1, ^5.0.2 and ^5.1.0 after installing it doesn't include lib and parcel folder. Have to downgrade to ^4.6.1 to make it work in application.

Version 5.0.2 has the library files. Remove node modules and lock file to install it

Screenshot 2023-06-22 at 07 06 43

@abhinavairi
Copy link

The package seems to have an error in the publish step. The generated code in node_modules is not complete: single-spa-react-output

In all package versions i.e. ^5.0.0, ^5.0.1, ^5.0.2 and ^5.1.0 after installing it doesn't include lib and parcel folder. Have to downgrade to ^4.6.1 to make it work in application.

Version 5.0.2 has the library files. Remove node modules and lock file to install it

Screenshot 2023-06-22 at 07 06 43

Agree only ^5.1.0 has issue

@wataruoguchi
Copy link

Same. Confirmed with Yarn 3. Downgraded to version 5.0.2 works fine.

I am not sure if this is related to this, but even with version 5.0.2, the following settings failed with single-spa-react:

  • Yarn 3
  • Vite
  • tsconfig moduleResolution: "Bundler"

Changing the moduleResolution to "Node" is the workaround.

@joeldenning
Copy link
Member

My guess is that this is related to #168

@joeldenning
Copy link
Member

joeldenning commented Jun 27, 2023

The autopublishing feature also might have messed with the folders that were published to npm. I have stopped all the autopublishing and am publishing manually now.

#162
#165

@joeldenning
Copy link
Member

joeldenning commented Jun 27, 2023

@darshkpatel do you know what could have caused this? I will attempt to replicate this and find a fix, but don't have a lot of work time budgeted for open source right now.

@darshkpatel
Copy link
Contributor

darshkpatel commented Jun 28, 2023

I tried checking out to v5.1.0 tag and running pnpm build it does generate the parcel and lib folders
What steps do you use to publish manually ?

@joeldenning
Copy link
Member

Ah I misread the issue. I thought the publish error only occurred with the previous versions rather than 5.1.0, and thought the issue was related to the package.json export rather than publishing. I have published version 5.1.1 which has the lib and parcel folders

@joeldenning
Copy link
Member

I've confirmed that version 5.1.1 works with a fresh create-single-spa project.

@joeldenning
Copy link
Member

I think the reason 5.1.0 had a bad publish is that I did it from a new computer and something might have been misconfigured. The package.json files property has lib and parcel listed, so I don't know why they weren't included. I published 5.1.1 from my normal work computer and it was fine - pnpm pack showed that the lib and parcel folders were to be included

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

8 participants