[英]Can anyone help me with npm --prefix?
I'm stuck with npm --prefix.我坚持使用 npm --prefix。 I'm trying to prefix my frontend folder so I can run both the backend and frontend at the same time.
我正在尝试为我的前端文件夹添加前缀,以便我可以同时运行后端和前端。
I keep getting an error with the wrong pathway: \backend\frontend/package.json.我不断收到错误路径的错误消息:\backend\frontend/package.json。
Can anyone help me with that?任何人都可以帮我吗?
{
"name": "backend",
"version": "1.0.0",
"description": "User Authentication APP - MERN stack",
"main": "server.js",
"scripts": {
"start": "node backend/server.js",
"server": "nodemon backend/server.js",
"client": "npm start --prefix frontend ",
"dev": "concurrently \"npm run server\" \"npm run client\""
}
}
You can test this package.json
"scripts": {
"server": "npm run watch --prefix server",
"client": "npm start --prefix client",
"watch": "npm run server & npm run client"
}
-> npm run watch
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.