“错误:在工作区之外运行 Angular CLI 时,此命令不可用。”但我位于正确的文件夹中

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

我收到此错误“错误:在工作区之外运行 Angular CLI 时此命令不可用。”当我启动从 github 克隆的 Angular 项目时,我使用命令行 ngserve 或 ngserve -o ,我的项目结构是

package.json 文件是

{
  "name": "gentelella",
  "version": "2.0-beta2",
  "description": "Gentelella Admin is a free to use Bootstrap admin template",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/puikinsh/gentelella.git"
  },
  "keywords": [
    "css",
    "js",
    "html",
    "template",
    "admin",
    "bootstrap",
    "theme",
    "backend",
    "responsive"
  ],
  "author": "Aigars Silkalns",
  "contributors": [
    "Christian Esperar"
  ],
  "license": "MIT",
  "main": "build/js/custom.min.js",
  "bugs": {
    "url": "https://github.com/puikinsh/gentelella/issues"
  },
  "homepage": "https://github.com/puikinsh/gentelella#readme",
  "devDependencies": {
    "browser-sync": "^2.26.7",
    "gulp": "^4.0.2",
    "gulp-autoprefixer": "^7.0.1",
    "gulp-concat": "^2.6.1",
    "gulp-rename": "^2.0.0",
    "gulp-ruby-sass": "^4.0.0",
    "gulp-uglify": "^3.0.2"
  },
  "dependencies": {
    "gentelella": "^1.4.0"
  }
}


我尝试从 github 重新克隆该项目

angular npm build-error
© www.soinside.com 2019 - 2024. All rights reserved.