Failed to deploy artifacts: could not find artifact npm - reactjs

I am a new aspirant of Devops.
Most of the blogs addressed related to "404 error Not found" are of maven projects.
Can anyone explain how to resolve it for a react project?
I am trying to deploy a react project onto nexus through ci pipeline[Jenkins].
For deployment, while configuring
//Following some blogs I tried these 2 ways:
Configuring .npmrc file
Altering package.json file
But neither have worked and still halted with the error. Now, I need:
What can be the cause of this error?
Are there any other ways to resolve the error? In perspective of npm format projects
Please help me
Thanks in advance

Related

Why am I getting a "Cannot find module './cli-engine'" error and how can I fix it?

I'm new to programming, so please be gentle.
When I use 'npm start' to view my react app in local host it won't compile. I get an error message, 'Cannot find module './cli-engine'. That was not the case until today.
I suppose this file was in node_modules until recently? How can I restore my development environment to normal without breaking anything?
Here's the full error message:
Cannot find module './cli-engine'
Require stack:
- /Users/louysgackstetter/Desktop/Portfolio/Dominion/dominion/node_modules/react-scripts/node_modules/eslint/lib/api.js
- /Users/louysgackstetter/Desktop/Portfolio/Dominion/dominion/node_modules/eslint-webpack-plugin/dist/getESLint.js
- /Users/louysgackstetter/Desktop/Portfolio/Dominion/dominion/node_modules/eslint-webpack-plugin/dist/linter.js
- /Users/louysgackstetter/Desktop/Portfolio/Dominion/dominion/node_modules/eslint-webpack-plugin/dist/index.js
- /Users/louysgackstetter/Desktop/Portfolio/Dominion/dominion/node_modules/eslint-webpack-plugin/dist/cjs.js
- /Users/louysgackstetter/Desktop/Portfolio/Dominion/dominion/node_modules/react-scripts/config/webpack.config.js
- /Users/louysgackstetter/Desktop/Portfolio/Dominion/dominion/node_modules/react-scripts/scripts/start.js
UPDATE: npm install did not fix the issue. Or rather, it did, I no longer got the error described above, but I got a different "Cannot find module" error instead. Ultimately I created a completely new react-redux app using the create-react-app command and moved my source code over. Took me 10 minutes, solved the problem like a charm.
You can try npm install, and see if that resolves the problem.
Here is explained everything you need to know about it:
What's the difference between dependencies, devDependencies and peerDependencies in npm package.json file?

Ant Design Cannot find module 'rc-textarea'

I just created an Umi Ant Design Pro project but when i run my project (yarn start),i am getting the following error:
Steps taken to resolve this issue:
1:installed rc-textarea:
yarn add rc-textarea
2:stopped my server and ran yarn again in my terminal
3:then ran yarn start to start my server and still got the same error although my terminal this time stopped displaying the error i keep getting in my browser as seen below:
Step4:I then did some Research and came across this link
Git Memory Blog
But the path : ./node_modules/antd/es/input/TextArea.js does not exist in my project.
I also found a github link with a similar issue:
GithubIssue
Other solutions did not work so i tried wbcs's solution:
yarn cache clean
yarn install
But the error is still eminent.
My inspection window indicates that this is a possible webpack issue:
How do i resolve this?
Try removing .umi and node_modules folders, and then start this project again.

npm run deploy failure when deploying React app to Github

Problem:
I am still very new to React and am trying to push my React app onto Github, but I keep running into an error when I deploy it on my console.
Set Up:
I am using Atom on a Windows 10 computer. I created my React app by using the commands, npx create-react-app jordon. I then followed the steps in this youtube tutorial. This is what my package.json looks like after following the tutorial:
I then went through the steps to initialize a github repository. However, after running npm run deploy, I come across an error:
I have tried to rerun the steps in the tutorial time after time, but either receive the same error, or an error that is resolved by uninstalling gh-pages from the folder but leads to the same error. At this point, I have not found any resources that would help me, since most people seem to have successfully ran the npm run deploy command. Any help would be much appreciated!

React Auth0 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

I have been following along with this introductory Auth0 React app build-along (link below) and have been running into the same error over and over and can't seem to find any solution. I made this yesterday and it worked 100% until it crashed and gave me this the error message below. I restarted the app many times, rebooted my computer, but nothing fixed it. To check my sanity, I started this project from scratch again but the error message still occurred.
I went to the path where the error was located but couldn't find anything that stood out to me. The problem seems to have started as soon as I installed the npm SDK npm install --save #auth0/auth0-spa-js because before I installed that, the app was working just fine and text was displaying as it should. As soon as you install the SDK, the text disappears.
I even deleted the entire auth0 package in the node_modules folder just to see what would happen and the same error message occurred. Does anyone have some insight into this problem? I am losing my mind and any help would be greatly appreciated!
Code-along link: https://auth0.com/blog/authenticating-your-first-react-app/
Error message: Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
Error location: ./node_modules/#auth0/auth0-spa-js/dist/auth0-spa-js.production.esm.js
SDK: npm install --save #auth0/auth0-spa-js (version 1.8.0)

Gatsby site 'page not found' when deploy on Netlify or Surge

I could run on localhost, however the site could not show up on Netlify and Surge as I tried to push it on Git. Feel free to check my code: https://github.com/treycwong/bean-tracker
I'm not sure if it's partly due to the dependencies in package.json or if I need to install Yarn? If so, some guidance will be helpful.
Added build settings on Netlify
Removed yarn.lock
With Surge, I've followed the instructions, I've deployed it successfully but still the page shows 'page not found'.
Your Netlify setting should be as follows, if you are not going to use yarn.
Publish location: public
Build command: npm run build
/netlify.toml
[build]
publish = "public"
command = "npm run build"
I know it's an old post but this could help more than one.
I've just deploy a Gatsby site to Netlify and I got the Page Not Found error.
I fixed it configuring the build settings as following:
Once I did it I got a Node error cause Netlify works by default with an old version. So I needed to force to use a newer one setting the Environment variable to the same I'm using locally:
Hope it helps to someone else!

Resources