You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm working on a project that uses single-spa and single-spa-react. I had to remove my node_modules folder and do a fresh install. After doing so, my project started throwing errors on start, specifically complaining about this:
ERROR in ./src/redacted.js 3:0-46
Module not found: Error: Can't resolve 'single-spa-react' in 'C:\projects\redacted\src'
resolve 'single-spa-react' in 'C:\projects\redacted\src'
Parsed request is a module
using description file: C:\projects\redacted\package.json (relative path: ./src)
Field 'browser'
Here's how I'm attempting to access single-spa-react in the file it's complaining about:
...
import singleSpaReact from 'single-spa-react';
...
const lifecycles = singleSpaReact({
React,
ReactDOM,
rootComponent: Root,
errorBoundary(err, info, props) {
// Customize the root error boundary for your microfrontend here.
return null;
},
});
...
I tried several fresh installs, cleaning my cache, etc., and couldn't get rid of this error. I have several other projects that use single-spa-react, so I decided to investigate their node_modules/single-spa-react directories to see if there were any discrepancies. Here's what I found. In an older project, node_modules/single-spa-react looks like this:
The lib and parcel directories are missing. To make sure this is what was causing the issue, I replaced node_modules/single-spa-react with the copy from the older repo, and that did fix the problem.
In case there was an issue with the machine I'm working on, I recreated this issue on a different computer in a completely fresh npm project. The package.json looks like this:
This results in the same thing - single-spa-react-test/node_modules/single-spa-react is missing the lib and parcel directories. Can I get any guidance on what I can/should do to fix this? Thanks!
The text was updated successfully, but these errors were encountered:
Hi, I'm working on a project that uses single-spa and single-spa-react. I had to remove my node_modules folder and do a fresh install. After doing so, my project started throwing errors on start, specifically complaining about this:
Here's how I'm attempting to access single-spa-react in the file it's complaining about:
I tried several fresh installs, cleaning my cache, etc., and couldn't get rid of this error. I have several other projects that use single-spa-react, so I decided to investigate their node_modules/single-spa-react directories to see if there were any discrepancies. Here's what I found. In an older project, node_modules/single-spa-react looks like this:
However, the repo with the fresh install looks like this:
The
lib
andparcel
directories are missing. To make sure this is what was causing the issue, I replacednode_modules/single-spa-react
with the copy from the older repo, and that did fix the problem.In case there was an issue with the machine I'm working on, I recreated this issue on a different computer in a completely fresh npm project. The
package.json
looks like this:This results in the same thing -
single-spa-react-test/node_modules/single-spa-react
is missing thelib
andparcel
directories. Can I get any guidance on what I can/should do to fix this? Thanks!The text was updated successfully, but these errors were encountered: