Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
592 votes
26 answers
646k views

How can I update the parent's state in React?

My structure looks as follows: Component 1 - |- Component 2 - - |- Component 4 - - - |- Component 5 Component 3 Component 3 should display some data depending on state of Component 5. Since ...
Wojciech Kulma's user avatar
113 votes
3 answers
191k views

Angular app has to clear cache after new deployment

We have an Angular 6 application. It’s served on Nginx. And SSL is on. When we deploy new codes, most of new features work fine but not for some changes. For example, if the front-end developers ...
zhangjinzhou's user avatar
  • 2,651
76 votes
6 answers
154k views

jQuery - Sticky header that shrinks when scrolling down

I wonder how to make a sticky header shrink(with animation) when you scroll down the page and goes back to normal state when the page is scrolled up to the top. Here are two examples to clearify: ...
user2362529's user avatar
75 votes
6 answers
62k views

Deploying a production Node.js server [closed]

I've written a Node.js app, I'm looking to get it running on one of our production machines. This seems like a pretty common request yet I can't find an adequate solution. Is there not established ...
David Chouinard's user avatar
71 votes
1 answer
179k views

How To Compile An Electron Application To A .exe [duplicate]

I've been learning how to create applications in Electron and I need help compiling a simple project to a Windows executable. The program is a clone from this Github repo: https://github.com/electron/...
Mitch Mitchell's user avatar
71 votes
5 answers
34k views

Secure distribution of NodeJS applications

What: Can NodeJS apps be distributed as binary? ie. you compile the .js app via V8 into its native binary, and distribute the binary to clients? (if you had total access to the NodeJS server)... or is ...
Robin Rodricks's user avatar
70 votes
11 answers
37k views

ExecJS::ProgramError: Unexpected token punc «(», expected punc «:» when running rake assets:precompile on production

When deploying my Rails app I get the following error: rake aborted! ExecJS::ProgramError: Unexpected token punc «(», expected punc «:» (line: 15, col: 14, pos: 265) Error at new ...
orion3's user avatar
  • 9,895
68 votes
3 answers
31k views

How to deploy a React + NodeJS Express application to AWS?

I have a React + Webpack/Babel + Node/Express application and I want to deploy it on AWS. Would I have to deploy React and Node/Express separately? Or could they be deployed together at once?
Dan Me's user avatar
  • 2,163
53 votes
8 answers
22k views

Develop Tampermonkey scripts in a real IDE with automatic deployment to OpenUserJs repo

I recently started development on a Tampermonkey script, which is hosted on OpenUserJs. It seems that I'm going to invest a bit more time in the future on this script by keep it up to date and extend ...
Lion's user avatar
  • 17.5k
43 votes
3 answers
26k views

What is the difference between build and dist folder?

As far as I know /dist is for production environments. It contains uglified and similar files. But why do we need a /build folder ?
markjiang's user avatar
  • 587
37 votes
5 answers
5k views

Why do concatenated RequireJS AMD modules need a loader?

We love RequireJS and AMD during development, where we can edit a module, hit reload in our browser, and immediately see the result. But when it comes time to concatenate our modules into a single ...
Brandon Rhodes's user avatar
35 votes
2 answers
52k views

What is the right way of production deployment of nestjs application

I've developed simple nestjs rest services. Now I am planning to deploy my app. Please help me with efficient way of production deployment of nestjs app.
Boobalan's user avatar
  • 825
34 votes
7 answers
59k views

React app has to clear browser cache after new deployment

We are deploying our React application on the apache server using the Jenkins pipeline. When we deploy new codes, most of the new features work fine but not for all changes reflect the latest in the ...
Nimish goel's user avatar
  • 2,721
33 votes
4 answers
13k views

Is there a deployment tool similar to Fabric written in JavaScript? [closed]

I put together a mobile development stack that is almost entirely using Javascript on node.js. With the only exception of SASS (prefer it to LESS) and Fabric. I prefer not to pollute my development ...
Peter Throwson's user avatar
30 votes
1 answer
15k views

Should I deploy sourcemaps to production?

I'm deploying my website - a static site built in GatsbyJS - and my sourcemaps are by far my largest files. I have 3 sourcemap files that are ~ 3MB. Overall they make up maybe 70% of my build. Should ...
Paul N's user avatar
  • 553
30 votes
7 answers
10k views

Best practices for managing and deploying large JavaScript apps

What are some standard practices for managing a medium-large JavaScript application? My concerns are both speed for browser download and ease and maintainability of development. Our JavaScript code ...
Daniel Fone's user avatar
  • 2,895
29 votes
4 answers
13k views

Meteor.js deploy to "example.com" or "www.example.com"?

I recently deployed a meteor app using the following command: $ meteor deploy example.com and later (thinking that it was the same) using the following: $ meteor deploy www.example.com It end up ...
jdscosta91's user avatar
28 votes
4 answers
3k views

How to handle deploys with Webpack code splitting?

Here's an unexpected issue I've run into with Webpack code splitting in the wild: Imagine this scenario: The user loads a React app with Webpack code splitting and a few bundle chunks are loaded A ...
Maros's user avatar
  • 1,923
25 votes
6 answers
17k views

Uncaught Error: Minified React error #425

When moving my application to production, these errors appeared, and I have no idea what it could be. I'm using: // package.json "dependencies": { "@supabase/supabase-js&...
Cesar Mejias's user avatar
23 votes
14 answers
34k views

Building Standalone Applications in JavaScript

With the increased power of JavaScript frameworks like YUI, JQuery, and Prototype, and debugging tools like Firebug, doing an application entirely in browser-side JavaScript looks like a great way to ...
Ben Combee's user avatar
  • 17.3k
20 votes
4 answers
17k views

i18n support is not compatible with next export. (SSR - NextJS 10)

i18n support is not compatible with next export. NextJS dont run the deploy with i18n Im using nextJS 10, and the main reason that i choose next 10, is that i can do SSR and use the i18n. ...
Luck dev's user avatar
  • 435
20 votes
3 answers
4k views

Packing, caching, JS and CSS in PHP that differentiate between development and production environment

I am trying to make development easy and have highly optimized output in production. The goals of what I am trying to do is: Make production pages fast! I would like that the Google Page Speed and ...
Chris Cinelli's user avatar
19 votes
6 answers
11k views

UglifyJS: concat and minify or viceversa?

I'm writing an app that uses many JS files. Underscore, Backbone, jQuery, jQuery plugins for sliders, several files for models, routers, collections and views. In my dev machine, I load every file ...
fedeisas's user avatar
  • 2,011
19 votes
11 answers
37k views

Bootstrap's javascript works locally but not when deployed to a server

I downloaded the barebone example of Twitter's bootstrap and customized it. I tested it locally (with WAMP server) and everything works perfectly, both the CSS and the JScript. I uploaded the files ...
dialex's user avatar
  • 2,806
18 votes
2 answers
6k views

NextJs export folder "out" doesn't have index.html

I’ve built a Next.js app, and I wanted to use static exporting to host the project on my hosting. The app is simple, so I didn’t use most of the features that Next.js offers. When I run: npm run build ...
khaled sakhai's user avatar
16 votes
13 answers
5k views

What do you do to your JavaScript code before deployment?

Do you have a step in your deployment process that minifies JS? Do you have any sort of preprocessor for your JavaScript that allows you to leave in comments and console.logs and then have them ...
Nosredna's user avatar
  • 85.1k
15 votes
3 answers
22k views

ReactJS deploy app error Cannot copy to clipboard: Command failed: xsel --clipboard --input

I'm trying to deploy a ReactJS app in my Ubuntu 16.04 server but when I execute the command: serve -s build This is my package.json file: { "name": "client", "version": "0.1.0", "private": ...
Dave's user avatar
  • 2,072
15 votes
4 answers
5k views

Express server: Error: Requested Range Not Satisfiable

Im writing my first node web server (feel free to give me feedback) that uses express and gith to deploy. The problem is I'm receiving the below error once deploying, and if I run the script via pm2 ...
gazzwi86's user avatar
  • 1,030
14 votes
2 answers
11k views

How to disable bundling in Webpack for development?

In my web app I was using RequireJS to asynchronously load my javascript files on demand. This worked well for dev - when debugging my app I could see which script is dependent on which and order in ...
Kirill Metrik's user avatar
13 votes
6 answers
7k views

combine javascript files at deployment in python

I'm trying to reduce the number of scripts included in our website and we use buildout to handle deployments. Has anybody successfully implemented a method of combining and compressing scripts with ...
Diarmuid Bourke's user avatar
13 votes
2 answers
21k views

Force browser to reload all cache after site update

Is there a way to force the clients of a webpage to reload the cache (i.e. images, javascript, etc) after a server has been pushed an update to the code base? We get a lot of help desk calls asking ...
Mickelback's user avatar
13 votes
2 answers
35k views

Angular Uncaught (in promise): ChunkLoadError: Loading chunk XXXfailed

I am using angular 12, and I use Service Worker to deploy new versions. It looks like each time I deploy a new version to production (and for some reason not on staging). Some user receive a bunch of ...
Crocsx's user avatar
  • 7,310
12 votes
2 answers
4k views

Javascript / Node.js based equivalent of Fabric? [closed]

I love how Fabric makes dealing with deployments to multiple servers easy (with proper support for SSH etc). However, since ours is s node.js based project, it would be great if we could do this in ...
UpTheCreek's user avatar
  • 32.1k
11 votes
5 answers
27k views

404: NOT_FOUND on Vercel deployment

I have build a web3 application using chakra-UI and three.js. I have added a metamask integration to the website, which helps to mint the NFTs on smart contract. When I do, npm run dev On my machine, ...
Hemang Joshi's user avatar
11 votes
1 answer
5k views

Can I Create Chrome Application Shortcuts Programmatically from a Web Page?

I've thought about using Chrome and HTML5 local storage to create a useful app and sell it. The problem I think I would have, however, is the delivery mechanism to get this installed on one's computer....
Volomike's user avatar
  • 24.7k
11 votes
1 answer
2k views

Advice with the deployment strategy to follow with NextJS

Could you recommend us the best practices to deploy applications in production with nextjs? We are thinking in strategies like: canary deployment, blue/green deployment... We have several doubts to ...
Alberto Delgado Roda's user avatar
10 votes
2 answers
3k views

Clear Angular JS templateCache once (for each deployment)

This issue AngularJS disable partial caching on dev machine suggests using $templateCache.removeAll() to clear the cache templates. However what if you just want to fire this once upon each ...
ericjam's user avatar
  • 1,519
9 votes
4 answers
30k views

Vue 3 & Vite built application shows blank page

I have a problem trying to make a build of a new Vue3.js + Vite.js application. Once my application is finished i made the npm run build action in order to generate the final deployment files. Problem ...
Javi Martínez's user avatar
9 votes
6 answers
14k views

Nginx and Create React App (with React Router) full routes not working

I have been stuck on this for days now and I need the internet's help. I have created a static HTML landing page project for my react application (These two projects are separate), and I wish to serve ...
nuxer's user avatar
  • 468
9 votes
2 answers
16k views

how to deploy nodejs api and vuejs app in one server

I have developed node rest api and vuejs web applications, Im trying to deploy both project in to one aws server which run ubuntu. Both applications have different port, domain I try to configure ...
Sampath's user avatar
  • 308
9 votes
8 answers
4k views

Should web-browsers allow to clear(expire) cache programmatically?

Currently browsers have incomplete caching implementation. It only allows to set expiration or keep immediate expiration. Important 3rd option to expire cache programmatically is missing. Without that ...
alpav's user avatar
  • 3,022
9 votes
4 answers
2k views

Django: render staticfiles through template engine at deploy-time

I want to render some static files (*.js in particularly) using Django template variables. I believe this is a common use-case, especially when doing anything AJAX-y; I don't want to hardcode AJAX ...
andy's user avatar
  • 1,439
9 votes
1 answer
11k views

Deploying react app with webpack

I am doing a tutorial on React and I have made a youtube clone based on react. Now I wanted to upload this to my domain (hosted at one.com) but it doesn't work because bundle.js can't be found. Rather ...
Robin Claes's user avatar
9 votes
1 answer
1k views

Environment independent builds using the Vue webpack template

I use a build server to build my Vue projects, using the npm run build command nicely supplied by the Vue 2 template. The Vue template also provides the ability to access environment-specific data ...
amoe's user avatar
  • 4,561
9 votes
1 answer
3k views

Deploying a web app using Vite, I am unable to deploy the .js file. "<script src="/index.js"> in "/index.html" can't be bundled without type="module"

When Deploying a web app using Vite, I am unable to deploy the .js file. Getting the below issue. $ vite build vite v2.8.6 building for production... **\<script src="/index.js"\> in &...
Joseph's user avatar
  • 91
8 votes
4 answers
5k views

Hosting Node app on my machine

So I've got a node app that I can access via localhost:someportnumber. How do I expose this app publicly (i.e. to the rest of the interwebz, not just my local network) using only my machine, and not ...
logic_'s user avatar
  • 113
8 votes
2 answers
17k views

'serve' is not recognized as an internal or external command to run react app

serve has been installed globally using npm install -g serve command and It works locally, but deploying to a Windows server gives the following error: "serve" is not recognized as an ...
Rahul Kumar's user avatar
8 votes
6 answers
6k views

different WAR files, shared resources

Suppose you have several applications which share the same code and most of the other resources, but have a somewhat different look and feel, some labels change, etc. (think branding). If each web ...
eljenso's user avatar
  • 16.9k
8 votes
4 answers
10k views

How to run React Boilerplate with forever

I'm going to run react-boilerplate application forever in the server. I found forever and I'm not sure how I pass parameters to forever. The command to run server is like following: PORT=80 npm run ...
Smart Solutions's user avatar

1
2 3 4 5
26