getting errors output with razzle - reactjs

I am using razzle for my react js app. when I run razzle start --verbose I get
✖ Client
Compiled with some errors in 4.88s
✖ Server
Compiled with some errors in 1.46s
I do not however get what the errors are.I have tried to find a way to get errors to be revealed but have had no luck.
Does anyone know how to configure so that you actually get the errors output?

What has helped me before is to do npm run build or razzle build, which usually means I missed an import.

Related

How to Refresh NPM files

I've been getting some syntax errors and i've removed all the code in the file, but the react app is showing the same compile errors and there is no use of npm run build even the build fails because of the syntax error which i removed already. What might be the problem?

How do I resolve "react-snap error on running build"

I installed react snap to my react project and then when I run build it doesn't crawl each page instead shows some error. Previously it was working fine, but don't know what happened now. this is the error which I am getting on running npm run build It would be nice if I could get a quick solution.

Yarn start fails with Unexpected identifier without details

I am trying to start up a react app. After cloning the code from github, running yarn install I ran yarn start and got the following error:
yarn run v1.22.10
$ cross-env HTTPS=true react-scripts start
Unexpected identifier
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The authors of the app don't know what might be wrong (it's working for them). I tried creating another app with create react app and that started up fine for me. I am not sure where to start looking as there is no indication as to where the "unexpected identifier" might be located or what it might be. Any ideas on what I might want to check or try? I am on MacOS Catalina.
I figured it out eventually. I tried running build and it failed on syntax error in one of the .js files (a missing comma). Once that was fixed the start ran too. If the start command returned the same informative error the build did it would have saved me hours :)

How to prevent failing to compile on CRA when eslint errors

I installed the new react/CRA versions. Right now when I have eslint errors the whole page blows and CRA fails to compile.
Sometimes I make some small test or debug something in the flow, and don't want CRA to fail the running only because of 1-2 intentional eslint errors.
Is there a possibility only to display the errors in the console, but not to fail to compile?
If it fails the npm run build it is okay.
Thanks and best regards

react-router tutorial not working on mac

I tried to get into react following the react tutorials and got it working, but when I started to go to the next step and use react-router through this tutorial I failed every time!
When I follow the instructions everything seems to be working OK, no errors on terminal, but I don't see any bundle.js files created in my project folder nor the localhost:8080 shows anything other than the following error in console:
GET http://localhost:8080/ net::ERR_EMPTY_RESPONSE
I tried installing npm locally and globally but none worked, same as webpack. Also I tried running the servers using webpack with the code webpack ./index.js bundle.js doesn't work either and throws the following error in terminal:
ERROR in multi main
Module not found: Error: Cannot resolve module 'bundle.js' in /Users/jafari/Desktop/React-Toturial/react-router-tutorial/lessons/01-setting-up
# multi main
While this code creates the bundle.js file and if I run this folder through MAMP on the localhost I can see the desired content of the tutorial, when I change anything in the App.js it doesn't take effect until I remove the bundle.js and do the process I mentioned earlier again in the terminal while still seeing the following error in the console:
bundle.js:49 Uncaught Error: Cannot find module "bundle.js"
And if I don't remove bundle.js I get this error in the console:
Warning: React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server:(client) <div data-reactid="(server) <div data-reactid="
Any ideas? or alternatively any suggestion or tutorial on how to use react-router?
Try to change the port to something else with the command webpack-dev-server --port 3000 --inline --content-base
You can also substitute the npm start script in the package.json with that line.

Resources