Typeerror: source is not iterable while uploading file into ipfs by using web3storage - web3js

Yesterday I bought my new laptop and installed all the stuffs like react, web3.storage etc on new versions.
I have a copy of my same source code on my another computer. In my computer this code work fine but not in my new laptop
I tried to upload my file on web3storage but not working.
Help me to recover !!

i ran into the same problem using nft.storage/web3.storage, i fixed it by removing package-lock.json and node_modules and re-installing it again.
you can also try create-react-app again, i think it was a problem with webpack

If you are using React and building apps with web3.storage, you might like the new React, etc components we are shipping as part of our beta w3up API. https://beta.ui.web3.storage

Related

My Expo project suddenly start showing Typescript missing, install. Whereas I am not using typescript at all

I am new to react-native and expo stuff. I was working on an application that worked fine until I installed react-native-wifi-reborn.
I was following this article since I wanted to connect to wifi from the app (This was the requirement).
After adding react-native-wifi-reborn, my project started without issues until I got an error in WifiManager.connectToProtectedSsid usage.
It was a logical error and I made small code changes (I was passing the incorrect wifi password), restarted the project, and started getting the below error. I tried removing react-native-wifi-reborn and now I tried googling it but no luck. This error just won't go.
I am getting the below error whenever I try to run the project, it was working fine till now
My app.json
babel.config.json
package.json
Project Structure
Ps: I don't want to install typescript, not comfortable using it. Please help how to fix.

Can't seem to get setupProxy.js working with Duende ASP.NET Core BFF and TypeScript React project

I can't seem to get the proxying to work for local development when trying to set up a Duende BFF with ASP.NET Core 6 and a TypeScript version of create react app.
Here's the repo I've been working in: https://github.com/dahlsailrunner/duende-bff-react-typescript
It's based on the sample from Duende which works fine: https://github.com/DuendeSoftware/Samples/tree/main/IdentityServer/v6/BFF/ReactBffSample
I'm simply trying to get a new version of the same thing that uses the TypeScript version of React.
If I leave the ClientApp/src/setupProxy.js file named as-is, the React app seems to build, but it never loads in the browser (the output from the react scripts all seems fine and it says it should be in the browser, but I always get "connection refused". This remains true even if I comment out every line in setupProxy.js.
If I rename the file in any way (make it a .ts file, or add -bak to it), everything loads fine on the site but the proxy to the backend/BFF doesn't work.
I've tried adding src/setupProxy.js to the exclude list in tsconfig.json as mentioned as a workaround here.
I'm guessing I'm missing something simple but just haven't been able to see it yet.
Wow - it turns out that the only problem from the code was that the version of http-proxy-middleware npm package was too current. Downgrading it to "http-proxy-middleware": "^0.19.1" did the trick - no other changes needed.

Sveltekit adapter-static fails: Cannot read property 'kit' of undefined

I'm trying to build a Sveltekit site using the adapter-static.
npm run preview works fine and npm run build seems to build fine before giving me a cryptic error:
Cannot read property 'kit' of undefined.
Can you point me towards a way to debug this - I cannot find where exactly the issue is.
Svelte is still under active development. Most likely you're trying to use the latest documentation while having the older Svelte dependencies installed locally.
Upgrading your Svelte dependencies should solve the problem.
Try to create a new project with a fresh install of SvelteKit and adapter-static and then copy your code from the old project. That worked for me. Seems like the two were out of sync.

my react project wont start back up using local host?

I am trying to update my react portfolio but to do that i have to be able to work on it. I have it up on heroku working and online. I pulled it up on my code editor and I do npm start and it compiles successfully but it wont go onto my localhost. Im wondering if anybody has an idea of why it wont come up. thanks a bunch
i think you can put your project in github and uplaod it to heroku through your repository and then you can change you code , run it in localhost and changes will automatically get applied to your protfolio online

Hot reload stopped working after adjusting environment for work requirements

I started a new developer role a few days ago and made some environmental changes to adapt for work. Since then, my hot reload/fast refresh has just stopped working entirely. Changes don't show up even if I refresh the page manually. Only shows changes when I stop the dev server and restart it with 'npm run dev'. The triangle indicator at the bottom right should be active, showing active reload of the window (this no longer shows up consistently either, and if it does the page gets reloaded, but alas the proposed changes aren't visible)
Context:
It has this effect on all NextJS and react applications of mine. Even running a basic project template off the NextJS examples page shows no hot reload working.
I researched this issue and it seems wrong imports (e.g. importing components using lowercase or files in the pages directory being capitalized) can cause this, but I combed through the code and can't spot any issues (of course, I could be missing it but my codebase is over 300 files).
Service workers in the background can cause issues, but I cleared my browser of all of them to be sure and it still doesn't fix it.
I installed ngrok for tunneling for work purposes and docker-compose to handle the work dev. environment.
Made sure I'm using the latest Next version. Even deleted node_modules and ran npm install. Deleted .next and the out folder and still no luck.
Anybody have any ideas or clues to what I should try next? Is it related to the stuff I installed for work? Something related to VS code or WSL2? Seems so puzzling it kind of just happened overnight. Thanks for any insight or advice!
System information
OS: Windows (WSL2 virtualization for VS code)
Browser: Chrome
Version of Next.js: 10.0.3
Version of Node.js: 14.8.0
Deployment: npm run dev for development work; amplify publish for AWS hosting
The problem is with WSL2. I use WSL2 inside VS Code; which is a big performance upgrade in the Linux environment. The problem is WSL2 is actually in a 'virtualization' and thus cannot send information from VS Code AND the browser (localhost:3000) at the same time.
It's a big issue they are working on and there is no fix yet for it. That's why fast refresh doesn't work because localhost is not receiving the changes being made. Either proxy through or revert back to WSL1 https://github.com/microsoft/WSL/issues/4769
Solution provide by OP on question section
Add a .env file or a .env.local file to your root and put this line on it:
WATCHPACK_POLLING=true
Now, restart your server.
Thanks I encounter the same issue with WSL2. I just switch to windows terminal and it works.
If you run Poweshell as administrator and run
wsl.exe -l -v
This will give you th eversion of wsl your distros run on.
I am personally using Ubuntu, and this is the output
Ubuntu Running 2
docker-desktop Stopped 2
docker-desktop-data Stopped 2
To switch to wsl 1,
Run
wsl.exe --set-version Ubuntu 1
and if you wanna switch back,
run,
wsl.exe --set-version Ubuntu 2.
This worked for me.
In my react projects, I just add in my .env file at the root project folder the values
FAST_REFRESH=false
CHOKIDAR_USEPOLLING=true
and it works! enjoy!
The problem is with WSL2. I use WSL2 inside VS Code. But React JS and Next JS projects don't auto-reload. So, add a .env or .env.local (recommended) file to your root and put these lines on it:
WATCHPACK_POLLING=true
CHOKIDAR_USEPOLLING=true
Now, restart your server.

Resources