In Jenkins console output, I'm able to see the NodeJs(AngularCLI logs etc) running but not able to get the error log of Nodejs project in the console output. Which we can see in the local build. It exit after the following line and not display the error logs. After
94% asset optimization fs.js:885
return binding.mkdir(pathModule._makeLong(path),
the error logs which we get after
ng build --prod
So was using the below line
node --max-old-space-size=4096 node_modules/.bin/ng build --prod --env=dev --output-path=dist/dev
which was checking the 3rdpartylicense, changed it to
node --max-old-space-size=4096 node_modules/.bin/ng build --prod --env=dev --output-path=dist/dev --no-extract-licenses
Note: added --no-extract-licenses
The logs started showing up
Related
I'm trying to deploy a static react website (nextjs) and I cannot due to the npm run build command not being able to run. I have an image in my public folder and it's saying it doesn't exist. I've never done this before and don't understand the error I'm getting. The github repository is https://github.com/mattmoon00/portfolio-website . I have tried using vercel and netlify and they both gave me the same error. I also cannot run "npm run build" in the terminal on my machine either. Thanks in advance.
When I run command npm start it's giving me error
ERROR
gatsby develop
Start development server. Watches files, rebuilds, and hot reloads if
something changes
And when I run command gatsby build it's giving me this error:
gatsby can only be run for a gatsby site. Either the current
working directory does not contain a valid package.json or 'gatsby' is
not specified as a dependency
I tried to delete node_modules and install again but still giving me the same error. How can I fix this?
It seems that you are not running the commands in the proper folder.
npm start, gatsby develop or gatsby build must be triggered in the root of your Gatsby project, where the package.json is located.
Share more details about where and how are you trying to run npm start and even your project structure in order to know what's going on.
I've tried installing gatsby-cli on my machine and created a new project, but after I generate it and try to serve it, I get Minified React error #31. These are the steps I've followed:
npm i -g gatsby-cli
And got many vulnerability issues I can't recover. I think it had to do with hapi. Then:
$ gatsby new my-project
$ cd my-project
$ gatsby serve
Then I get
failed We've encountered an error: Minified React error #31; visit
https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=Error%3A%20ENOENT%3A%20no%20such%20file%20or%20directory%2C%20open%20'%
2FUsers%2Fwayoshi%2FDev%2Flegionhack-home%2F.cache%2Fmatch-paths.json'&args[]= for the full message or use the non-minified dev
environment for full errors and additional helpful warnings.
Would this be a known common error?
Here's my enviroment info:
macOS 10.14 Mojave
node v12.22
npm v7.21
gatsby develop runs the development server. If you want to run a production build you need gatsby build to build the app and then gatsby serve to run the production build.
Not familiar with how to use netlify. Im trying to deploy this app
https://github.com/Rshauneb/real-estate
my build command is:
npm run watch
but every time I try to deploy my site I keep getting this error.
"failed during stage 'building site'"
Any suggestions?
Mimic what Netlify is doing in the build using their build bot.
Clone your project into a clean directory from GitHub
npm install
npm run watch
If you do not get an error, you may have a global command or setting that does not get set on Netlify. Without more information, this is the only answer possible.
Here is the error I found when I did the above:
Problem #2
Watch is a command for local development, so you should not be using npm run watch as a build command on Netlify. You will need to run the command to build your site into a directory for deploy and use that directory for your "Deploy directory".
I am using angular 1.4.14, bower 1.8.0 and npm 3.6.0. I have used the following yeoman generator,https://github.com/dustinspecker/generator-ng-poly, to setup my project. I have full fledged web-ui ready in development mode when i run "gulp" cmd. But when i'm trying to generate production build by 'gulp --stage prod', which terminates without any log before minifying the templates. Find below the last logs generated,
[22:29:06] ESLint found no problems in 1 file
[22:29:06] Finished 'markup' after 2.29 s
[22:29:06] Starting 'scripts'...
[22:29:13] gulp-imagemin: Minified 26 images (saved 109.57 kB - 12.9%)
[22:29:13] Finished 'scripts' after 6.69 s
[22:29:13] Finished 'images' after 8.73 s
user#user:frontend$
I have checked all the console logs prior to this, there isn't any error or fatal error message displayed. The same code works in development mode.
How do I know whats failing the production build?