Cannot find module '#next/env' Next-js Vercel - reactjs

I have developed a Next.js app that works fine on my local machine. I am trying to deploy my app on Vercel but it keeps throwing me the error Cannot find module '#next/env' as shown here.
I think it's because of the next-sitemap package. I have checked my node modules and there is no env file or folder inside the #next folder.
I have also researched around but haven't been able to find any solution.
I have also tried deploying my app on Netlify and it throws the same error. Any help would be appreciated a lot.
UPDATE:
I was finally able to solve this by updating my next.js to 10.2.3

just add "#next/env": "^12.0.7" inside dependencies in your package file or just write npm install #next/env

Related

React app deployed to GitHub giving me a minified error #152

I am having a problem with my React application. I am trying to deploy the website to GitHub pages but I am getting this error:
Error: "Minified React error #152; visit https://reactjs.org/docs/error-decoder.html?invariant=152&args[]=u for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
The error is telling me to use the non-minified development environment, but I cannot figure out how to do this.
Here is a link to my GitHub repository if you would like to check!
GitHub repository
I am not sure how to solve this since this is the first time I try to deploy a website. I tried installing some dependencies like Webpack, Babel, and Parcel to bundle my files into a readable JavaScript file, but my guess is that something is not being translated properly, meaning that there might be a syntax error somewhere in my code.
When running the Webpack dependency I did get a series of errors, that is why I installed some other libraries and loaders:
Error on Terminal
I ran into the same issue. The issue occurred wherever I deployed a production build to - locally or Firebase. I found that I had some comments in my render/return code and removing them solved this for me, as discussed at https://github.com/facebook/create-react-app/issues/8687.
I removed the comments as suggested, but ended up using gh-pages instead of deploying via a docs directory on github, so it worked in the end. I have deployed other apps after that with comments and they work just fine.
So if you ever run into this, try gh-pages instead

I'm getting an error: pathspec 'branch-name' did not match any file(s) known to git

I'm currently deploying a nextJS site to github pages but was getting an error upon running npm run deploy. I'm suspecting it is a git checkout error but not sure where to start investigating.
Here's a screenshot of the error:
Am I missing something?
Any help would be much appreciated.
This is fixed. I've used ZEIT Now to deploy my application instead. See:
https://nextjs.org/learn/basics/deploying-a-nextjs-app/deploying-to-zeit-now
Then, assigned my domain name to my ZEIT Now deployment. For my code to still be visible in Github, I've just pushed my NextJS site to the repo.

Unable to resolve "./aws-exports" from "App.js"

I have been building an app with awsamplify for quite some time now. Today I descided to run some test and when I did
npm run start-web
Everythin worked fine. Now I went on to run mobile test with the use of Expo and ran
npm run ios & npm run android
which both returned the following errors.
Unable to resolve "./aws-exports" from "App.js"
Building JavaScript bundle: error
my problem is similar to the one below just its amplify and not awsmobile
https://github.com/aws-amplify/amplify-js/issues/669
Deos anyone know what I can do to resolve this?
Thanks alot!
I jsut removed some unused imports and the error changed to this
Unable to resolve "#aws-amplify/ui/dist/style.css" from "node_modules\aws-amplify-react\dist\Amplify-UI\Amplify-UI-Components-React.js"
Barely mentioned in the AWS docs:
For setting up a local dev folder, from an existing amplify repo, use an amplify env pull,
It will "pull" the ./aws-exports.js from the server, the latest one that was pushed there,
similar to git push and git pull but for the amplify env
It's true that an amplify push will create the ./aws-exports.js file,
but it will also "push" it to the server, overwriting whatever is there.
amplify status is also a handy command, similar to git status
I ran amplify env pull
and then found it in the ./src/aws-exports.js
not sure if the pull did it, or if it was always there but this is for an existing expo project
Confing your projects, using terminal go to the main folder and amplify init to config your project
amplify init
Do you to use an existing environment? (Y/n) Y
Choose the environment you would like to use: dev
Choose your default editor: Visual Studio Code
Choose the type of app you're building: javascript
What javascript framework you're using: ionic
Source Directory Path: src
Distribution Directory Path: www
Build Command: npm run-script build
Do you want to use an AWS profile? Y
Please choose the profile you want to use: select your personal IAM profile

how Improve Build Error Reporting on ReactJs?

I just created a react app using
npm create-react-app my-app
I like this error reporting in chrome and on CLI.
Is there a way so i can configure or setup such error reporting in my existing React application ?
because when i setup react app by following a number of tutorials i do not see this nice output. thanks. You can see the images below for instance.
After exploring the repository i found create-react-app using
react-error-overlay module.
See this link if somebody wants to setup in your existing react application.
I guess...
you typo wrong.
error previous line <dvs remove this.

Running any React-Native project for iOS results in 'Unable to resolve module' error

I'm trying out the much hyped React-Native as an alternative to native development. I have installed nvm, react, react-native, and the cli by following this guide.
I have tried downloading and running several projects from github but no project has ever run (navigate to project directory, npm install then react-native run-ios) successfully. I usually get this error: 'Unable to resolve module'.
The error mentions it may be related to https://github.com/facebook/react-native/issues/4968. It also provides some solutions, non of which have ever worked. Reinstalling the node modules never works, neither does resetting the cache. I have also tried reinstalling react, rn, and the cli. The last 'solution' is to recreate the project from scratch, which I haven't tried thus far.
The emperor has no clothes.
P.S Even the example iOS project in the react-native github repo throws errors (albeit different ones: No script URL provided.)

Resources