Questions tagged [npm-build]

For questions regarding an NPM build script.

For questions regarding an NPM build script.

152 questions
12
votes
1 answer

Vite Vue 3 library build doesn't implicitly include dist/style.css

I built a library project (Vue 3, Vite) and I want to include it in a host project via package.json. But I faced a problem where I can import the components and run a simple programme with those imported components but their styles are gone. Please…
Beast
  • 370
  • 2
  • 14
11
votes
3 answers

Error: Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtime (88)

I'm deploying my Vue.js project on GitLab pages. Running npm run build during GitLab CI pipeline results in errors: Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): ModuleBuildError: Module build failed (from…
john grad
  • 141
  • 1
  • 6
9
votes
2 answers

Azure pipeline npm build failing for React: Unexpected token

In Azure DevOps, the pipeline fails at the npm run build step with an error in one of the indirect dependencies (check line 18 below). The error is jest-worker/build/index.js:110 _ending; SyntaxError: Unexpected token ";" . The pipeline.yaml is…
D S
  • 195
  • 1
  • 11
7
votes
2 answers

npm run build is not minifying the reactJs project

I executed the npm command "npm run build" from the reactJs App root folder and "build' folder is generated with the below output in the console. File sizes after gzip: 646.8 KB build\static\js\2.d370d4e1.chunk.js 12.46 KB …
Nofi
  • 2,107
  • 1
  • 15
  • 23
5
votes
4 answers

Receive error when deploy to GitHub pages

I'm deploy react app to git hub pages and receive error. File sizes after gzip: 68.67 KB build\static\js\2.c2c334ae.chunk.js 2.98 KB build\static\js\main.8a72b1a2.chunk.js 774 B build\static\js\runtime~main.8f8a00a4.js The project was built…
Sergey Bekker
  • 53
  • 1
  • 3
4
votes
3 answers

NPM RUN BUILD ERROR in ./node_modules/@fortawesome/fontawesome-svg-core/styles.css

My Error Capture ERROR in ./node_modules/@fortawesome/fontawesome-svg-core/styles.css…
4
votes
0 answers

When running 'npm run build' it won't create a build directory

I am a bit new using React still. I am trying to make my git repo visible to GitHub-pages. When running the npm run build , it successfully complies but it won't create a build folder. In result, when I try to run npm run deploy it complies until I…
brador
  • 41
  • 2
4
votes
1 answer

Running webpack on low-memory machine

I have 512MB RAM machine with 512MB of swap memory available (basically it is heroku 7$ tier). Total is 1GB. My npm build takes 1.5 GB of RAM locally (npm build exits with MemoryError on heroku), I don't want to include /build folder into git and…
JaktensTid
  • 272
  • 2
  • 5
  • 20
3
votes
1 answer

Getting Error - allocation failure scavenge might not succeed & Allocation failed - JavaScript heap out of memory

React Version: 18.2.0 Node.js version: v16.18.0 Npm version: 8.19.2 **Problem ** I am getting error in my AWS EC2 t2.micro Ubuntu OS while building my react-app. Whenever I try to use npm run build I get following error <--- Last few GCs…
3
votes
0 answers

Erro in npm run build

I am trying to use @vitejs/plugin-legacy in my Svelte project,but when I give the command npm run build, it gives this error: [vite-plugin-svelte-kit] ENOENT: no such file or directory, open…
Iago Alexandre
  • 307
  • 1
  • 1
  • 8
3
votes
0 answers

how to serve build folder with pm2

I am trying to serve my node.js and react application with pm2 including loading data from mongoDB. So far I can serve the build with serve -s build -l 3001 i am using port 3001 for the front end. And pm2 start server.js for the backend which runs…
Joshua
  • 1,005
  • 1
  • 11
  • 16
3
votes
1 answer

error code ELIFECYCLE while running npm run build

I have built react app based on fuse react theme it is running fine in the dev environment by npm start but I'm getting error while making production build, running npm run build to make a production build but getting ELIFECYCLE error, I have tried…
Hassan Shahbaz
  • 596
  • 1
  • 14
  • 38
3
votes
2 answers

React/Node "JavaScript heap out of memory" error on publish in Visual Studio

I know this problem has been raised many times, so please bear with me. npm build run keeps failing with the "JavaScript heap out of memory" error. I've tried setting the Node heap size using the environment variable as well as command-line argument…
Adam Hey
  • 1,512
  • 1
  • 20
  • 24
2
votes
1 answer

VueJS + Vite runs into error on build. Error: EINVAL: invalid argument, realpath

We have a problem in our NodeJS environment on the servers of ProfiHost (German provider) using Vite in a VueJS app. Installing the deps via npm i works fine. However, the build via npm run build always runs with the following error: failed to load…
Tobi360
  • 188
  • 1
  • 10
2
votes
1 answer

Getting "blocked by CORS policy" error after `npm run build`

I am a newbie to React. I created a React app which is working fine on npm start. But after npm run build, I am not getting full page info. i.e. I am getting the nav bar but the main content is not available. On the console, the following error is…
1
2 3
10 11