为什么我的npm run dev命令不起作用?

iq0todco  于 2023-08-06  发布在  其他
关注(0)|答案(1)|浏览(143)


i我正在使用refine和react构建一个新项目我已经使用npm下载了所有的文件和依赖项,但是当我尝试使用npm run dev打开它们时,我得到了一个错误https://www.youtube.com/watch?v=k4lHXIzCEkM&t=80s我试图在这个视频中做这个项目,当我键入npm run dev时,我得到了这个错误:

`> refine-project@0.1.0 dev
> refine dev

'Crud' is not recognized as an internal or external command,
operable program or batch file.
internal/modules/cjs/loader.js:905
  throw err;
  ^

Error: Cannot find module 'C:\Users\Administrator\Desktop\@refinedev\cli\dist\cli.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
    at Function.Module._load (internal/modules/cjs/loader.js:746:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}`

字符串
我的包.json:

{
  "name": "refine-project",
  "version": "0.1.0",
  "private": true,
  "type": "module",
  "dependencies": {
    "@emotion/react": "^11.8.2",
    "@emotion/styled": "^11.8.1",
    "@mui/icons-material": "^5.8.3",
    "@mui/lab": "^5.0.0-alpha.85",
    "@mui/material": "^5.8.6",
    "@mui/x-data-grid": "^6.6.0",
    "@refinedev/cli": "^2.7.4",
    "@refinedev/core": "^4.28.2",
    "@refinedev/inferencer": "^4.3.2",
    "@refinedev/kbar": "^1.1.2",
    "@refinedev/mui": "^5.0.0",
    "@refinedev/react-hook-form": "^4.1.2",
    "@refinedev/react-router-v6": "^4.1.0",
    "@refinedev/simple-rest": "^4.0.0",
    "apexcharts": "^3.41.0",
    "axios": "^0.26.1",
    "core-util-is": "^1.0.3",
    "i18next": "^20.1.0",
    "i18next-browser-languagedetector": "^6.1.1",
    "i18next-xhr-backend": "^3.2.2",
    "react": "^18.0.0",
    "react-apexcharts": "^1.4.1",
    "react-dom": "^18.0.0",
    "react-hook-form": "^7.30.0",
    "react-i18next": "^11.8.11",
    "react-router-dom": "^6.8.1",
    "webpack-dev-server": "^4.15.1"
  },
  "devDependencies": {
    "@types/node": "^18.16.2",
    "@types/react": "^18.0.0",
    "@types/react-dom": "^18.0.0",
    "@typescript-eslint/eslint-plugin": "^5.57.1",
    "@typescript-eslint/parser": "^5.57.1",
    "@vitejs/plugin-react": "^4.0.0",
    "eslint": "^8.38.0",
    "eslint-plugin-react-hooks": "^4.6.0",
    "eslint-plugin-react-refresh": "^0.3.4",
    "typescript": "^4.7.4",
    "vite": "^4.3.1"
  },
  "scripts": {
    "dev": "refine dev",
    "build": "tsc && refine build",
    "preview": "refine start",
    "refine": "refine",
    "start": "node server.js"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "refine": {
    "projectId": "SUjkIB-RDWgKs-moVUlK"
  }
}


我已经开始了我的项目从'refine.new'我不知道这是否有帮助
我什么都试过了

npm install -g npm@latest
npm i core-util-is
npm i -f    
npm cache clean --force
npm config set ignore-scripts false

mf98qq94

mf98qq941#

错误“'Crud' is not recognized as an internal or external command”表示您的代码试图将“Crud”作为命令运行,但找不到它。
我建议将您的代码与教程的ClientServer repo进行比较,以找到任何差异。尝试使用CTRL + SHIFT + F在代码中搜索“Crud”,看看它是否显示出来。

相关问题