Questions tagged [npm-build]

For questions regarding an NPM build script.

For questions regarding an NPM build script.

152 questions
2
votes
1 answer

@types/express-serve-static-core/index.d.ts causing build errors

Started encountering this issue after pushing changes which has nothing to do with the node_modules or the deployment pipeline. This issue is also seen when trying to rerun an already successful deployment in bitbucket. I even tried updating the…
LST
  • 43
  • 7
2
votes
2 answers

How to Revert NPM Run Build With Laravel9

As the title says. Usually npm run dev is used for the local environment but I have run npm run build mistakenly in cmd and npm run build minify all files. Now I can't debug my front end.I also deleted the node_modules and package-lock.json file and…
Adnan Ali
  • 61
  • 6
2
votes
2 answers

How can I create a build from a JavaScript file based on node modules?

I created a new node project using npm init npm install apollo-server I then added a index.js file with the following code: const { ApolloServer, gql } = require('apollo-server'); const typeDefs = gql` type Query { hello: String …
stefan.at.kotlin
  • 15,347
  • 38
  • 147
  • 270
2
votes
2 answers

Docker build getting stuck at npm run build step

I was trying to create a docker Image where it is getting stuck at the "npm run build" step. I could see the message as build completed successfully but it is not proceeding to the next step. below the docker file. I m using node:16.13.1 as base…
ajith kumar
  • 301
  • 1
  • 9
  • 20
2
votes
1 answer

Programmatically running `npm run build` does not generate `index.html` for Angular 8 app

I want to build my Angular 8 application programmatically for an automated process and using following C# method. private bool RunBuildProd(string angularAppFolder) { try { ProcessStartInfo objPI = new…
Chirag
  • 1,683
  • 2
  • 17
  • 26
2
votes
2 answers

When exactly are devDependencies included into the angular build

I have an angular project that I build in two different ways - for two different environments (DEV and PROD; both on a corporate server) Online I found different definitions of when the devDependencies (from package.json) are included into the…
2
votes
4 answers

npm build how to change package.json - homepage value by variable or script

I created my app using create-react-app, and I use npm run build to build the production package. I need to put the app on different clients' sites, each client put the app on a different sub-folder. e.g. client A: https://clientA.com/myApp client…
Eric Cheng
  • 477
  • 1
  • 9
  • 24
2
votes
1 answer

VueJs FATAL ERROR: MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory

Building (npm run build) my VueJs project gives an error. package.json { "name": "acme-web", "version": "0.1.0", "private": true, "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build", …
Bopsi
  • 2,090
  • 5
  • 36
  • 58
2
votes
1 answer

Typescript Invalid 'reference' directive syntax

I'm setting up a typescript-nodejs project in my local environment in which I'm facing an issue when I try to perform the npm run build-ts It throws the following error: node_modules/@types/mongodb/index.d.ts:40:1 - error TS1084:…
2
votes
3 answers

Tailwind css purge removes all dark classes

I have a pretty simple project which uses a couple of colours extended to the theme. When I enable purging in my tailwind.config.js file, everything is purged as they should, but all of my dark classes get purged too. Does anyone have the same…
Narc0t1CYM
  • 499
  • 6
  • 25
2
votes
0 answers

How can I run a build for only one environment?

I am working on a react project, I have several environments, when I run a build for one environment e.g npm run build-sit, the JavaScript files in the build folder contain information about other environments. How do I make sure that the JavaScript…
Eve
  • 43
  • 7
2
votes
0 answers

Types for dependency of dependency in Dev Env not building

I understand variations of this question have been asked six ways to Sunday, but none of the answers on those questions are fixing my issue. I have created package A. Its build is included in a dist folder and the package is loaded to npm. I have…
1
vote
0 answers

NextJS saying that there is a syntax error when using build

I am attempting to use NextJS and I am run the command npm run build but it says next command cant be found. I re-install next globally this time (npm i -g next) and the net command is found but is then throwing an error saying "unexpected token…
1
vote
1 answer

Next.js & sanity | Error occurred prerendering page "/" while npm run build

Next.js application uses sanity, I tried so many things but none of them worked for me, Every component is exported and imports are also correct. while doing npm run build application gives following error Error occurred prerendering page "/".…
1
vote
1 answer

Error: Failed to collect page data for /dashboard

I use nextjs to build the frontend of my website. I recently added some code (which I'm pretty sure is correct) to my project. After running npm run build, I got an error that tells me that nextjs failed to collect the data for one of my pages. >…
1
2
3
10 11