React : Change in node_modules file does not reflect the change in UI [closed] - javascript

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
Maybe I am doing it wrong. I want to do changes in node_modules folder. Now when I run npm run watch or npm run dev it doesn't get reflected in UI.
Any idea what is wrong?

Try editing from the /dist folder of the library you are trying to edit. Your changes will not reflect if you edit from the source and not from the output bundles.
Note: If you are just logging a result (via console.log) that is fine, but as much as possible, do not edit from the node_modules folder.

Related

How to fix missing script "dev" when i write npm run dev to run react?

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 hours ago.
Improve this question
i use vite and can't run react : enter image description here
cant run react app in visual studio code
// package json : enter image description here
you need to add dev command to scripts in package.json refer: https://docs.npmjs.com/misc/scripts/

How to reduce node_module file size [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I am working on 2-3 react apps, and for each app when I run npm install, it installs a bunch of dependencies in the "node-module" folder which is approximately 250-300mb in size! It becomes really hard to deploy that on Github. Is there any way to reduce file size of node_module folder.
You don't need to push node modules to github, they should be included in your .gitignore file.
Within the root directory, edit .gitignore and add the line
node_modules/
Now when you push to github, the node_modules directory will be ignored.

Slow build react project [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I have created React apps.when I try to build react project using "npm run build" command from terminal,it takes more than 15 minutes to build project.Can any one advise what is the actual problem of this ???
It creates build for production, so it invoke some optimizations
If you want build your app faster you can build with development enviroment without optimizations
For this you can change mode parameter on mode: 'development' in your webpack config

When should i build 'dist' folder and when i should not? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I know dist folder is used for production, distribution and what it should contain.
What i want to know is, when is the best time to use it? in what kind of work environment/project requirement i should use dist folder? like Heroku, what are the other platforms where i can deploy an app without dist and the platforms where i can't deploy without it (if there is any)?
I'm new to this, if someone can clearify the process would be very much helpful.
The dist folder is for production website it's not necessary to have it. It will contain for example your image, css, script, vendor folder ready for production (minified and concatenated).
You can check on google for this. Type "how to deploy a production React app to Heroku" for example.

How to update Nuxt.js to the latest version [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm using Nuxt.js 1.2 in my project, but I want to update it to latest version. How to do it? What needs to be considered when updating the version?
Simply run: yarn upgrade nuxt#^2.3.2
As stated here:
Please note that for upgrading Nuxt.js just changing version inside
package.json is not enough. Please use yarn upgrade or npm upgrade so
that the final directory structure of node_modules will be correct. In
case of problems clean up node_modules and
yarn.lock/package-lock.json.

Categories