找不到模块:错误:无法在“ C:\ Users \ JJ \ Documents \ JHipster Projects \ indigo \ node_modules \ fs.realpath”中解析“ fs”

时间:2019-03-28 20:36:49

标签: angular-cli jhipster

我在角度项目中运行npm start时遇到问题。运行时,我得到以下输出:

Module not found: Error: Can't resolve 'fs' in 'C:\Users\JJ\Documents\JHipster Projects\indigo\node_modules\fs.realpath'

我已经尝试“安装它们,您可以运行:npm install --save child_process fs,但是没有用

我的package.json是:

{
"name": "indigo",
"version": "0.0.0",
"description": "Description for indigo",
"private": true,
"license": "UNLICENSED",
"cacheDirectories": [
    "node_modules"
],
"browser": {
    "child_process": false,
    "fs": false
},
"dependencies": {
    "@angular/animations": "^7.2.11",
    "@angular/cdk": "^7.3.6",
    "@angular/common": "7.2.4",
    "@angular/compiler": "7.2.4",
    "@angular/core": "^7.2.4",
    "@angular/forms": "7.2.4",
    "@angular/material": "^7.3.6",
    "@angular/platform-browser": "7.2.4",
    "@angular/platform-browser-dynamic": "7.2.4",
    "@angular/router": "7.2.4",
    "@fortawesome/angular-fontawesome": "0.3.0",
    "@fortawesome/fontawesome-svg-core": "1.2.14",
    "@fortawesome/free-solid-svg-icons": "5.7.1",
    "@ng-bootstrap/ng-bootstrap": "4.0.2",
    "@ngx-translate/core": "11.0.1",
    "@ngx-translate/http-loader": "4.0.0",
    "@types/jspdf": "^1.2.2",
    "angular-calendar": "^0.27.1",
    "angular-font-awesome": "^3.1.2",
    "bootstrap": "4.2.1",
    "child_process": "^1.0.2",
    "core-js": "2.6.4",
    "date-fns": "^1.30.1",
    "file-saver": "^2.0.1",
    "font-awesome": "^4.7.0",
    "fs": "0.0.1-security",
    "hammerjs": "^2.0.8",
    "moment": "2.24.0",
    "net": "^1.0.2",
    "ng-jhipster": "0.9.1",
    "ngx-cookie": "2.0.1",
    "ngx-infinite-scroll": "7.0.1",
    "ngx-webstorage": "2.0.1",
    "rxjs": "^6.4.0",
    "rxjs-compat": "^6.4.0",
    "rxjs-observable": "0.0.7",
    "swagger-ui": "2.2.10",
    "tslib": "1.9.3",
    "zone.js": "0.8.29"
},
"devDependencies": {
    "@angular/cli": "7.3.1",
    "@angular/compiler-cli": "^7.2.11",
    "@ngtools/webpack": "7.3.1",
    "@types/chai": "4.1.7",
    "@types/chai-string": "1.4.1",
    "@types/jest": "24.0.0",
    "@types/mocha": "5.2.5",
    "@types/node": "10.12.24",
    "@types/selenium-webdriver": "3.0.14",
    "angular-router-loader": "0.8.5",
    "angular2-template-loader": "0.6.2",
    "autoprefixer": "9.4.7",
    "browser-sync": "2.26.3",
    "browser-sync-webpack-plugin": "2.2.2",
    "cache-loader": "2.0.1",
    "chai": "4.2.0",
    "chai-as-promised": "7.1.1",
    "chai-string": "1.5.0",
    "codelyzer": "4.5.0",
    "copy-webpack-plugin": "4.6.0",
    "css-loader": "2.1.0",
    "file-loader": "3.0.1",
    "fork-ts-checker-webpack-plugin": "0.5.2",
    "friendly-errors-webpack-plugin": "1.7.0",
    "generator-jhipster": "5.8.2",
    "html-loader": "0.5.5",
    "html-webpack-plugin": "3.2.0",
    "husky": "1.3.1",
    "jest": "24.1.0",
    "jest-junit": "6.2.1",
    "jest-preset-angular": "6.0.2",
    "jest-sonar-reporter": "2.0.0",
    "lint-staged": "^8.1.5",
    "mini-css-extract-plugin": "0.5.0",
    "mocha": "5.2.0",
    "moment-locales-webpack-plugin": "1.0.7",
    "optimize-css-assets-webpack-plugin": "5.0.1",
    "postcss-loader": "3.0.0",
    "prettier": "1.16.4",
    "protractor": "5.4.2",
    "reflect-metadata": "0.1.13",
    "rimraf": "2.6.3",
    "sass": "1.17.0",
    "sass-loader": "7.1.0",
    "simple-progress-webpack-plugin": "1.1.2",
    "style-loader": "0.23.1",
    "terser-webpack-plugin": "1.2.2",
    "thread-loader": "2.1.2",
    "to-string-loader": "1.1.5",
    "ts-loader": "5.3.3",
    "ts-node": "8.0.2",
    "tslint": "5.12.1",
    "tslint-config-prettier": "1.18.0",
    "tslint-loader": "3.6.0",
    "typescript": "3.2.4",
    "webpack": "4.29.3",
    "webpack-cli": "3.2.3",
    "webpack-dev-server": "^3.1.14",
    "webpack-merge": "4.2.1",
    "webpack-notifier": "1.7.0",
    "webpack-visualizer-plugin": "0.1.11",
    "workbox-webpack-plugin": "3.6.3",
    "write-file-webpack-plugin": "4.5.0",
    "xml2js": "0.4.19"
},
"engines": {
    "node": ">=8.9.0"
},
"lint-staged": {
    "{,src/**/}*.{md,json,ts,css,scss}": [
        "prettier --write",
        "git add"
    ]
},
"scripts": {
    "prettier:format": "prettier --write \"{,src/**/}*.{md,json,ts,css,scss}\"",
    "lint": "tslint --project tsconfig.json -e 'node_modules/**'",
    "lint:fix": "npm run lint -- --fix",
    "ngc": "ngc -p tsconfig-aot.json",
    "cleanup": "rimraf target/{aot,www}",
    "clean-www": "rimraf target//www/app/{src,target/}",
    "e2e": "protractor src/test/javascript/protractor.conf.js",
    "postinstall": "webdriver-manager update --gecko false",
    "start": "npm run webpack:dev",
    "start-tls": "npm run webpack:dev -- --env.tls",
    "serve": "npm run start",
    "build": "npm run webpack:prod",
    "test": "npm run lint && jest --coverage --logHeapUsage -w=2 --config src/test/javascript/jest.conf.js",
    "test:watch": "npm run test -- --watch",
    "webpack:dev": "npm run webpack-dev-server -- --config webpack/webpack.dev.js --inline --hot --port=9060 --watch-content-base --env.stats=minimal",
    "webpack:dev-verbose": "npm run webpack-dev-server -- --config webpack/webpack.dev.js --inline --hot --port=9060 --watch-content-base --profile --progress --env.stats=normal",
    "webpack:build:main": "npm run webpack -- --config webpack/webpack.dev.js --env.stats=minimal",
    "webpack:build": "npm run cleanup && npm run webpack:build:main",
    "webpack:prod:main": "npm run webpack -- --config webpack/webpack.prod.js --profile",
    "webpack:prod": "npm run cleanup && npm run webpack:prod:main && npm run clean-www",
    "webpack:test": "npm run test",
    "webpack-dev-server": "node --max_old_space_size=4096 node_modules/webpack-dev-server/bin/webpack-dev-server.js",
    "webpack": "node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js"
},
"jestSonar": {
    "reportPath": "target/test-results/jest",
    "reportFile": "TESTS-results-sonar.xml"
}
}

0 个答案:

没有答案