Im trying to deploy a website but I always have those errors no matter what hoste I use,
here as u can see :
enter image description here
I tried to understand what means postcss, so after found some stuff about that, I put it on my package.json and installed dependence with npm but nothing change, can someone help please ?
Thank you very much
Edit : Yes I'm sorry, here my package.json :
{
"name": "my-app",
"version": "0.1.0",
"private": true,
"proxy": "http://localhost:3000",
"homepage": ".",
"dependencies": {
"#babel/plugin-syntax-flow": "^7.18.6",
"#fortawesome/fontawesome-free": "^6.2.0",
"#fortawesome/fontawesome-svg-core": "^6.2.0",
"#fortawesome/free-regular-svg-icons": "^6.2.0",
"#fortawesome/free-solid-svg-icons": "^6.2.0",
"#fortawesome/react-fontawesome": "^0.2.0",
"#testing-library/jest-dom": "^5.16.5",
"#testing-library/react": "^13.4.0",
"#testing-library/user-event": "^14.4.3",
"css-select": "^5.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^4.4.0",
"react-router-dom": "^6.4.2",
"react-scripts": "5.0.0",
"react-validation": "^3.0.7",
"uuidv4": "^6.2.13",
"web-vitals": "^3.0.3",
"postcss": "^8.4.17",
"postcss-pseudo-class-any-link": "^7.1.6"
},
"scripts": {
"start": "react-scripts --expose-gc --max_old_space_size=12000 start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"postcss": "^8.4.17",
"postcss-pseudo-class-any-link": "^7.1.6",
"sass": "^1.55.0"
}
}
and the log from vercel :
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/postcss-pseudo-className-any-link/-/postcss-pseudo-className-any-link-7.1.6.tgz - Not found
npm ERR! 404
npm ERR! 404 'postcss-pseudo-className-any-link#https://registry.npmjs.org/postcss-pseudo-className-any-link/-/postcss-pseudo-className-any-link-7.1.6.tgz' is not in this registry.
npm ERR! 404 This package name is not valid, because
npm ERR! 404 1. name can no longer contain capital letters
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! /vercel/.npm/_logs/2022-10-11T11_12_38_905Z-debug-0.log
Detected `package-lock.json` generated by npm 7+...
Running "npm run build"
> my-app#0.1.0 build
> react-scripts build
sh: react-scripts: command not found
Error: Command "npm run build" exited with 127
There is no package called postcss-pseudo-className-any-link. Please check your package.json file and remove the package.
There is package called postcss-pseudo-class-any-link, maybe try installing that.
Related
npm install is failing with the below message. I tried deleting the node_modules folder and installing it again, but it didn't work:
15104 error command sh -c node-gyp-build
15105 error sh: node-gyp-build: command not found
How can I solve this?
Error log of npm install --verbose:
npm ERR! code 127
npm ERR! path /Users/johnnycheng/Documents/React Projects/blockchain:fintech/coin-web-test2/node_modules/utf-8-validate
npm ERR! command failed
npm ERR! command sh -c node-gyp-build
npm ERR! sh: node-gyp-build: command not found
npm verb exit 127
npm timing npm Completed in 30755ms
npm verb unfinished npm timer reify 1650620386080
npm verb unfinished npm timer reify:build 1650620407577
npm verb unfinished npm timer build 1650620407582
npm verb unfinished npm timer build:deps 1650620407583
npm verb unfinished npm timer build:run:install 1650620407669
npm verb unfinished npm timer build:run:install:node_modules/bufferutil 1650620407670
npm verb unfinished npm timer build:run:install:node_modules/utf-8-validate 1650620407692
npm verb code 127
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/johnnycheng/.npm/_logs/2022-04-22T09_39_45_773Z-debug-0.log
File package.json of my project:
{
"name": "coin-web-test2",
"version": "0.1.0",
"private": true,
"dependencies": {
"#emotion/react": "^11.9.0",
"#emotion/styled": "^11.8.1",
"#fontsource/roboto": "^4.5.5",
"#mui/material": "^5.6.2",
"#testing-library/jest-dom": "^5.14.1",
"#testing-library/react": "^13.0.0",
"#testing-library/user-event": "^13.2.1",
"crypto-js": "^3.1.9-1",
"ethers": "^5.6.4",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.3.0",
"react-scripts": "4.0.3",
"web-vitals": "^2.1.0",
"web3": "^1.7.3"
},
"scripts": {
"start": "NODE_ENV=production node_modules/react-scripts/bin/react-scripts.js start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
Check the full error log here: Full error log
Environment: macOS v12.3.1 (Monterey)
Node.js version: 16.14.2
npm version: 8.7.0
Running yarn install and then npm install somehow works.
I don't any idea how.
Try installing using this command as follows:
npm install node-gyp
I can't find node-gyp module in your package.json file.
Try running npm install node-gyp and following the instructions for node-gyp module npm link.
I have a nodejs and reactjs project. I have writen server and it's working by its own and writen a react SPA and its working too by its own. I uses "concurently" for starting them together but then get these errors:
[0] npm ERR! missing script: servernpm run client
[0]
[0] npm ERR! A complete log of this run can be found in:
[0] npm ERR! C:\Users\1\AppData\Roaming\npm-cache\_logs\2020-12-14T18_43_22_867Z-debug.log
[0] npm run server"npm run client exited with code 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! shop#1.0.0 dev: `concurrently "npm run server""npm run client"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the shop#1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\1\AppData\Roaming\npm-cache\_logs\2020-12-14T18_43_22_906Z-debug.log
I have deleted node_modules in client dir and install it agin but it did help me
Here is my main package.json
{
"name": "shop",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"test": "node app.js",
"server": "nodemon app.js",
"client": "npm run start --prefix client",
"dev": "concurrently \"npm run server\"\"npm run client\""
},
"author": "",
"license": "ISC",
"dependencies": {
"bcryptjs": "^2.4.3",
"config": "^3.3.3",
"express": "^4.17.1",
"express-validator": "^6.8.0",
"jsonwebtoken": "^8.5.1",
"mongoose": "^5.11.7"
},
"devDependencies": {
"concurrently": "^5.3.0",
"nodemon": "^2.0.6"
}
}
here is my client package.json(react)
{
"name": "client",
"version": "0.1.0",
"private": true,
"dependencies": {
"#testing-library/jest-dom": "^5.11.6",
"#testing-library/react": "^11.2.2",
"#testing-library/user-event": "^12.6.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-scripts": "4.0.1",
"web-vitals": "^0.2.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
Can you help me? I would appriciate that!
Your script is not written correctly, it "glues" lines together and you get this: servernpm run client.
Change it to:
"dev": "concurrently \"npm run server\" \"npm run client\""
The error is -
npm ERR! missing script: start
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\mattj\AppData\Roaming\npm-cache\_logs\2020-10-09T07_53_19_254Z-debug.log
yet I've checked my package.json and the "start" script is right there.
{
"name": "gmcb-react",
"version": "0.1.0",
"private": true,
"dependencies": {
"#testing-library/jest-dom": "^4.2.4",
"#testing-library/react": "^9.5.0",
"#testing-library/user-event": "^7.2.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-scripts": "3.4.3"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
I'm new to React, so is there a command I'm supposed to run before npm start? I've tried running npm init first to no avail.
Make sure you're in the right folder before you run a script
You can check what file you're in via the terminal command cwd
If you're no in the right folder make sure you're in the same folder as your package.json
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /mnt/c/Users/x/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/mnt/c/Users/x/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/josh/.npm/_logs/2020-08-21T20_00_59_578Z-debug.log
{
"name": "todos-clone-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"#testing-library/jest-dom": "^4.2.4",
"#testing-library/react": "^9.5.0",
"#testing-library/user-event": "^7.2.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-scripts": "3.4.3",
"webpack-dev-server": "^3.11.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
I have an issue when using npm start (used create-react-app). Anyone that can see what's wrong?
Error notification in my terminal:
npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\charl\Desktop\IRONHACK\react-interview\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\charl\Desktop\IRONHACK\react-interview\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
{
"name": "particeep",
"version": "0.1.0",
"private": true,
"dependencies": {
"#testing-library/jest-dom": "^4.2.4",
"#testing-library/react": "^9.5.0",
"#testing-library/user-event": "^7.2.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-scripts": "3.4.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
try to delete package.json and write npm install
npm cache clean -f
rm -rf node_modules
npm i
I think you used npm create-react-app projectname (with npm). This should NOT be done.
You want to use npx create-react-app projectname (with npx) when creating a new project.
I made the same mistake for my first project. Instead of messing around with the terminal, the simplest option I found was just copy the files you already have, delete the folder, and create a new react folder with npx
you have to use npm start after going to the root folder of the app by entering cd your_app_name(app name which used with npx creat-react-app code in terminal)