Questions tagged [npm-build]

For questions regarding an NPM build script.

For questions regarding an NPM build script.

152 questions
1
vote
1 answer

how to save log data using log-rotate after deploy react app by npm build & pm2 serve?

I made the react app by cra in typescript. I tried to deploy by pm2, so I set the shell script like this. startup.sh #!/bin/bash npm install # Install pm2 globally npm install -g pm2 pm2 install pm2-logrotate pm2 set pm2-logrotate:rotateInterval 50…
juls
  • 65
  • 5
1
vote
1 answer

How do I get "--base-href" to not expand to an absolute path when building using npm?

I'm using Angular 14 and NPM 8. I have this command for building my artifact ... npm run build -- --source-map --base-href=/my-app/ --output-path=dist/my-app/ The problem is, when my dist/my-app/index.html file is generated it contains the full…
Dave
  • 15,639
  • 133
  • 442
  • 830
1
vote
1 answer

Running npm run build produces same output

When running npm run build on a project where I've changed something on its package.json, produces the exact same output as if I hadn't done any changes after running npm run build again. I'm trying to upload the build folder to Pinata and it's…
dNyrM
  • 545
  • 1
  • 4
  • 17
1
vote
0 answers

npm EER! Missing script: "build" with Github Action

I tried to deploy my react app to the droplet in the digital ocean using Github action, but I faced a problem when Github Action try to run the build command, it always throws an error: Run npm run build npm ERR! Missing script: "build" npm ERR!…
Jonh
  • 95
  • 1
  • 2
  • 13
1
vote
0 answers

Npm build stage is taking 1 hour to run and failed once adding "builder": "@angular-builders/custom-webpack:dev-server" to angular.json

I have added custom webpack to my angular project angular.json : { "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "version": 1, "newProjectRoot": "projects", "projects": { "youdeserve-frontend": { "projectType":…
1
vote
2 answers

How to fix CSS styling issues on Safari and Firefox

I built this e-commerce site for a client using ReactJS and deploying via Netlify automatic github deploys. I'm getting very strange results in Firefox and Safari (Big Sur and before). This error appears in the Safari console: Did not parse…
JBrown
  • 825
  • 6
  • 22
1
vote
0 answers

How to reduce bundle.js / main.[hash].js size in react js?

n my react app, when I run npm run build then lot of chunk files are created and also one main.[hash].js file and that main.[hash].js file size is ~138kb (attached screenshots below for reference) Due to this performance of my app is getting low as…
Yuvraj Chaudhari
  • 191
  • 1
  • 2
  • 10
1
vote
1 answer

Module not found: Error: Can't resolve 'crypto', webpack < 5 used to include polyfills for node.js core modules by default

I was trying to build the react project using npm run build but it failed with the following messages. ❯ npm run build > coin-web-test2@0.1.0 build > react-scripts build Creating an optimized production build... Failed to compile. Module not…
jonijeng
  • 195
  • 3
  • 9
1
vote
1 answer

Getting blank page After uploading the build code into cPanle

I am trying to deploy the react code on cPanel and I refer to this link but I am getting a blank page. Any suggestion on how to solve this? I have the below code in package.json { "name": "New", "homepage": "https://example.com/new/", …
user9437856
  • 2,360
  • 2
  • 33
  • 92
1
vote
2 answers

Error: EISDIR: illegal operation on a directory, readlink 'D:\study\noobinjs\pages\_app.tsx' when trying to run 'npm run build' for next js app

Im getting the above mentioned error when trying to run the npm run build for next js app. The next.js app is in typescript. Here is the error screenshot with the folder structure Error. Unable to understand why _app.tsx is being considered as…
1
vote
0 answers

Import functions into Background.js file Chrome Extension

I'm creating a Chrome extension with React using CRA. I want to use some helper functions within the /src folder inside of the background.js file, which causes the error Cannot use import statement outside a module because it's in the public…
1
vote
2 answers

How to figure it out on which mistake i made when i run npm run build?

I'm quite new to this VueJS things. And this is my first App creating a SPA with separated server-side app. I faced the problem right before deploying my app on a shared hosting. Simply, when i run "npm run build", it return with an error in which i…
1
vote
1 answer

How can I avoid running "npm run build" for a really small changes on the app?

I have to run npm run build for any small changes on the app, even for a text box. However, it gets annoying and inefficient when the application size gets bigger and bigger. Is there any way of taking a build for the only part that is changed? My…
Wokers
  • 107
  • 3
  • 13
1
vote
2 answers

npm run build failing

I am trying to build my react and node.js web app but fail to build ever since fixing packages. i get the following error Module not found: Error: Can't resolve 'fs' in 'my-app/node_modules/dotenv/lib' npm ERR! code ELIFECYCLE npm ERR! errno…
Joshua
  • 1,005
  • 1
  • 11
  • 16
1
vote
0 answers

How to install all dependencies of angular custom libraries

We have an angular 11 project with more than 20 custom angular libraries created by us. When we need to run npm install we need to change directory to each library. Is there any way we can run npm install for all libraries without manually changing…
1 2
3
10 11