无法从 VS Code 终端运行 `npm start`,但可以从 `cmd` 运行

问题描述 投票:0回答:1

我的package.json:

{
  "name": "my-app",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "react": "^18",
    "react-dom": "^18",
    "next": "14.1.0"
  },
  "devDependencies": {
    "typescript": "^5",
    "@types/node": "^20",
    "@types/react": "^18",
    "@types/react-dom": "^18",
    "autoprefixer": "^10.0.1",
    "postcss": "^8",
    "tailwindcss": "^3.3.0",
    "eslint": "^8",
    "eslint-config-next": "14.1.0"
  }
}

使用

cmd
时它可以工作,但我仍然收到错误。

这是我点击

localhost
 中的 
cmd

的链接后的结果

我想从 Live Server 中查看我的网页是什么样子。我不知道使用 Node/React 时如何看到它。

javascript reactjs node.js package.json npm-start
1个回答
0
投票

阅读下面的链接,看看它是否对您有用 nodemon

© www.soinside.com 2019 - 2024. All rights reserved.