Hii sir,
PS E:\test> npm run dev
[email protected] dev E:\test
concurrently "npm run server""npm run client"
[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\SIF\AppData\Roaming\npm-cache_logs\2019-03-18T12_07_00_378Z-debug.log
[0] npm run server"npm run client exited with code 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: concurrently "npm run server""npm run client"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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\SIF\AppData\Roaming\npm-cache_logs\2019-03-18T12_07_00_483Z-debug.log
i found this error when i concurrently add that client/server
this my //nodejs package.json
{
"name": "test",
"version": "1.0.0",
"description": "Tv feed ",
"main": "server.js",
"scripts": {
"client-install": "npm install --prefix client",
"start": "node server.js",
"server": "nodemon server.js",
"client": "npm start --prefix client",
"dev":"concurrently "npm run server""npm run client""
},
"author": "sonali",
"license": "ISC",
"dependencies": {
"body-parser": "^1.18.3",
"concurrently": "^4.1.0",
"express": "^4.16.4",
"mongoose": "^5.4.19"
},
"devDependencies": {
"nodemon": "^1.18.10"
}
}
//react client
{
"name": "client",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^16.8.4",
"react-dom": "^16.8.4",
"react-scripts": "2.1.8"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"proxy": "http://localhost:5000",
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}
everything is correct but when i run command npm run dev it shows error like this which is mension on code..
or if i run instead of that npm start it look like this
PS E:\test> npm start
[email protected] start E:\test
node server.js
(node:836) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
Server started on port ${port}
MongoDB Connected...
but not redirect to react app like you shown on video...
plz sir help me what can i do