I began a Reactjs tutorial project using Sanity for backend stuff. For 3 days now I am unable to do anything at all. The only thing that works (at random) is sanity start to open my backend schemas in the browser I get a million errors wwhen I try to install packages, open my Reactjs app in the browser, or even move files into my vs code. I have uninstalled VS Code and Node a dozen times now. Please, please, please can anybody help me.
All suggestions will be greatly appreciated as I am a complete noob in the web dev space.
I tried uninstalling and reinstalling nodejs, my code editor (i.e VS Code), have restarted the project from scratch and tried to load other, smaller and simpler beginner Reactjs builds I did before, and even they do not open.
The most recent error is the localhost refusing to open. Along with being unable to install react-icons and node-sass, amongst others.
Related
I update an old repo: https://github.com/cbartel/nw-company-tool The creator of this project created a tutorial which explains how to install everything, only if you use his node distribution.
My question is: how do I recreate the same node distribution using the files in the tar.gz release?
What are the steps? Installing nest? then what? should I install angular? or? Should I run the build.ts? I don't know from where should I start. I come from Python. I know basic html, but I don't know how prisma, angular, nest, node and everything work.. I read and watch tutorials about the basic, but I still don't know where should I start for making that GitHub work on my Ubuntu server without using the guy's node distribution.
Can someone be so kind to check his repo and tell me from where to start? Will be really appreciate. I spent 40+ hours trying to start all .ts file but only with errors and unsuccessfully.
I tried to run in terminal the commands the ts script use, but got the same errors.
what am I missing?
I tried every command I found on the internet to fix the errors, but created just more errors.
I'm using Digital Ocean Ubuntu 20 as server with domain buy from ionos.
I try to run line of commands present in the files build.ts and other ts files. nothing works.
If I use his node distribution I get 0 errors. but the files are changed, and for doing 1 update, or add some data, I need to change 12 js files or more, that's why I'm trying to setup my distribution so I can edit just 4 files and everything should work fine, but I don't know how to create the same node distribution the guy released on his GitHub. I'm using his same files and I don't understand what is wrong.
I added angular universal to my project and upon saving, it compiles successfully though in the network tab I can see the request for whatever route im on gets hung on pending and the website stays loading forever in the browser. This issue is not present during CRS. Things I have tried that did not work:
I have cloned the same project elsewhere to see if it was some fat finger accident
I have not only add logic to stop DOM methods from being used, I have outright removed the use of them everywhere in the app
I added 3rd party libraries like Domino js to mock methods on Node
I started a completely blank angular project, added nothing to it other than angular universal and I get the same issue!
I will try it on another computer soon to see if it is just an issue on this machine.
What could the issue be? I don't get any errors and refreshing the page it works.
Is hot reload broken for me? missing anything?
EDIT: I have now tried it on a 2 other Windows machines and the result is the same. Perhaps this is a bug. Essentially makes Angular useless to me.
Angular Version 12.1
I was able to get it to work by upgrading my Angular to version 14, and starting a fresh project with SSR added. Frustratingly to say the least but I can finish my project and I copied back in most of my code from the project I was working on.
For what ever reason Angular 11 and 12 were giving me this issue on multiple machines on fresh angular projects. It never gave me any errors to show. I will report back if any time during the rest of the porting of code if the issue persists.
I had the same hassle when initially integrated the Angular Universal to my project.
After a period of time I consider the according workaround:
SSR for the single page applications is useful in production for SEO, Open Graph, etc.
Angular Universal adds additional files:
main.server.ts
app.server.module.ts
Then the classic angular approaches are still possible to be used (the old app.module.ts).
Now for the local development environment I'm continue using the classic "ng serve" command and the Angular continue reloads normally on each file change.
And the SSR is compileing only for the production build.
Then if I want to debug something related to the SSR I'm deploying the production build to the test environment and calling the test urls to see the results.
I recently faced the task of converting a fairly mature angular project to SSR because I had overestimated the search power of SEO in angular projects. I'm not familiar with node, my angular project is on an apache server and uses php(slim) as the backend api, however, when I started trying to use "most of the tutorials", i.e., the first step, introducing nguniversal/express-engine into the project, it went well, npm did not report any errors.
Then I tried to run npm run build:ssr and it also worked fine. The problem is that when I run npm run serve:ssr, it ends up throwing a "ReferenceError: navigator is not defined" error...
Earlier, I built a completely clean angular project for testing, from build:ssr to run serve:ssr. Even I specified node xxxx/xxxx/main.js directly, no problem, which is obvious, because the angular project for testing is absolutely clean.
However, this does not work on my current "existing angular project". Yes, I fully understand that SSR doesn't allow for navigator or most so-called DOM manipulation, and although I'm not familiar with angular universal yet, I've previewed it and I know that's not possible, but here's the biggest problem :
In this existing angular project, there is no any navigator operations, not even a single line of code
In fact, main.js is also generated automatically, I can't stop it at all, I don't understand why there is "navigator" written in main.js?
I've checked many so-called solutions, including writing something in server.ts, but nothing helps, how can I continue? This is really quite desperate!
Big thank any help!
this is my first question ever. I'm trying to run an Adonis.js app by entering adonis serve --dev at the terminal. The messages are always the same in this succession:
SERVER STARTED
Watching files for changes...
Fatal error in , line 0
Check failed: U_SUCCESS(status).
FailureMessage Object: 000000D7655ECBA0Application crashed, make sure to kill all related running process, fix the issue and re-run the app
The only thing that changes is the FailureMessageObject. My Node version is 12.0, npm 6.9.
I can't say anything seriously working on your situation cause you gave me no detailed data but I know that surely you are doing something wrong.
It could be better if you at least mentioned the version of adonisjs you've been using.
Anyway, if you learned to run your server from a video from someone else's youtube channel, I strongly recommend you to read documentation and stop watching those videos.
And for adonisjs there are 2 different documentation:
adonisjs's Documentation, version 4.1 or less.
You can change the version on top left combo box.
adonisjs's preview Documentation, version 5.0.
Actually the documentation is not still completed at this time but the version is stable. yeah, that's the reason why I wrote preview.
And that's it, start recreating an adonisjs app from documentation guides.
I solved it. It was something with node or npm. I followed this steps enumerated in this post: How to completely remove node.js from Windows. Reinstalled node. Installed Adonis and it's CLI again and created an app and this time the app didn't crashed, and ran smoothly (after that I also created some migrations and they too worked well).
I've started a course to learn React and I'm having
trouble in developmental setup.
In the previous course, I used browser-sync and in this course the teacher used lite-server, so I installed that. But now, on creating react app, I'm having this error and I can't understand, please help.
I'm new to the whole npm, node.js environment.
Screenshot of Error