- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我有 Node v:10.15.0,npm v:6.4.11我正在尝试安装 JHipster。文件生成工作正常,但是当它运行 npm install
时,我收到此错误:
npm ERR! Unexpected end of JSON input while parsing near '....0.2","null-loader":"'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\chiheb\AppData\Roaming\npm-cache\_logs\2019-01-07T21_05_15_281Z-debug.log
这是日志文件的结尾:
2606 silly saveTree pharma-care@0.0.0
2606 silly saveTree +-- @angular/common@7.1.0
2606 silly saveTree | `-- tslib@1.9.3
2606 silly saveTree +-- @angular/compiler@7.1.0
2606 silly saveTree +-- @angular/core@7.1.0
2606 silly saveTree +-- @angular/forms@7.1.0
2606 silly saveTree +-- @angular/platform-browser-dynamic@7.1.0
2606 silly saveTree +-- @angular/platform-browser@7.1.0
2606 silly saveTree +-- @angular/router@7.1.0
2606 silly saveTree +-- @fortawesome/angular-fontawesome@0.3.0
2606 silly saveTree +-- @fortawesome/fontawesome-svg-core@1.2.8
2606 silly saveTree +-- @fortawesome/free-solid-svg-icons@5.5.0
2606 silly saveTree +-- @ng-bootstrap/ng-bootstrap@4.0.0
2606 silly saveTree +-- bootstrap@4.1.3
2606 silly saveTree +-- core-js@2.5.7
2606 silly saveTree +-- moment@2.22.2
2606 silly saveTree +-- ng-jhipster@0.5.6
2606 silly saveTree +-- ngx-cookie@2.0.1
2606 silly saveTree +-- ngx-infinite-scroll@6.0.1
2606 silly saveTree +-- ngx-webstorage@2.0.1
2606 silly saveTree +-- rxjs@6.3.3
2606 silly saveTree +-- tslib@1.9.3
2606 silly saveTree `-- zone.js@0.8.26
2607 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '....0.2","null-loader":"'
2607 verbose stack at JSON.parse (<anonymous>)
2607 verbose stack at parseJson (C:\Program Files\nodejs\node_modules\npm\node_modules\json-parse-better-errors\index.js:7:17)
2607 verbose stack at consumeBody.call.then.buffer (C:\Program Files\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\body.js:96:50)
2607 verbose stack at process._tickCallback (internal/process/next_tick.js:68:7)
2608 verbose cwd E:\education\ENISo\IA3.2\ProjetSemestriel\PharmaCare
2609 verbose Windows_NT 10.0.17134
2610 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--cache-min" "86400"
2611 verbose node v10.15.0
2612 verbose npm v6.4.1
2613 error Unexpected end of JSON input while parsing near '....0.2","null-loader":"'
2614 verbose exit [ 1, true ]
我认为问题出在 Jhipster 生成的 package.json 文件中,但我找不到其中的错误。包.json:
{
"name": "pharma-care",
"version": "0.0.0",
"description": "Description for PharmaCare",
"private": true,
"license": "UNLICENSED",
"cacheDirectories": [
"node_modules"
],
"dependencies": {
"@angular/common": "7.1.0",
"@angular/compiler": "7.1.0",
"@angular/core": "7.1.0",
"@angular/forms": "7.1.0",
"@angular/platform-browser": "7.1.0",
"@angular/platform-browser-dynamic": "7.1.0",
"@angular/router": "7.1.0",
"@fortawesome/angular-fontawesome": "0.3.0",
"@fortawesome/fontawesome-svg-core": "1.2.8",
"@fortawesome/free-solid-svg-icons": "5.5.0",
"@ng-bootstrap/ng-bootstrap": "4.0.0",
"bootstrap": "4.1.3",
"core-js": "2.5.7",
"moment": "2.22.2",
"ng-jhipster": "0.5.6",
"ngx-cookie": "2.0.1",
"ngx-infinite-scroll": "6.0.1",
"ngx-webstorage": "2.0.1",
"rxjs": "6.3.3",
"swagger-ui": "2.2.10",
"tslib": "1.9.3",
"zone.js": "0.8.26"
},
"devDependencies": {
"@angular/cli": "7.0.6",
"@angular/compiler-cli": "7.1.0",
"@ngtools/webpack": "7.0.6",
"@types/jest": "23.3.9",
"@types/node": "10.12.10",
"angular-router-loader": "0.8.5",
"angular2-template-loader": "0.6.2",
"autoprefixer": "9.3.1",
"browser-sync": "2.26.3",
"browser-sync-webpack-plugin": "2.2.2",
"cache-loader": "1.2.5",
"codelyzer": "4.5.0",
"copy-webpack-plugin": "4.6.0",
"css-loader": "1.0.1",
"file-loader": "2.0.0",
"fork-ts-checker-webpack-plugin": "0.5.0",
"friendly-errors-webpack-plugin": "1.7.0",
"generator-jhipster": "5.7.2",
"html-loader": "0.5.5",
"html-webpack-plugin": "3.2.0",
"husky": "1.2.0",
"jest": "23.6.0",
"jest-junit": "5.2.0",
"jest-preset-angular": "6.0.1",
"jest-sonar-reporter": "2.0.0",
"lint-staged": "8.1.0",
"mini-css-extract-plugin": "0.4.5",
"moment-locales-webpack-plugin": "1.0.7",
"optimize-css-assets-webpack-plugin": "5.0.1",
"prettier": "1.15.2",
"reflect-metadata": "0.1.12",
"rimraf": "2.6.2",
"simple-progress-webpack-plugin": "1.1.2",
"style-loader": "0.23.1",
"terser-webpack-plugin": "1.1.0",
"thread-loader": "1.2.0",
"to-string-loader": "1.1.5",
"ts-loader": "5.3.0",
"tslint": "5.11.0",
"tslint-config-prettier": "1.16.0",
"tslint-loader": "3.6.0",
"typescript": "3.1.6",
"postcss-loader": "3.0.0",
"xml2js": "0.4.19",
"webpack": "4.26.0",
"webpack-cli": "3.1.2",
"webpack-dev-server": "3.1.10",
"webpack-merge": "4.1.4",
"webpack-notifier": "1.7.0",
"webpack-visualizer-plugin": "0.1.11",
"workbox-webpack-plugin": "3.6.3",
"write-file-webpack-plugin": "4.5.0"
},
"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/}",
"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"
}
}
所以我希望你能找到这个问题的解决方案,因为我花了很长时间才提出这个问题。
最佳答案
我遇到了同样的错误,我修复了运行 npm cache clean --force
关于node.js - 错误: Unexpected end of JSON input in npm install after running jhipster command,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54082156/
一旦在 qconsole Marklogic 中运行以下代码,我就会遇到以下错误 XDMP-UNEXPECTED: (err:XPST0003) Unexpected token syntax err
我已经在我的包中编写了这个函数。 def partitionIntoDays(ls, number, lookupKey=None): ''' Partitions the location
我只是一个 android 初学者,我已经安装了 Android Studio(版本是 1.0.2),并创建了一个新的空白应用程序,按照名为“构建你的第一个应用程序”的官方教程,我学习到这个页面' h
这只是前几天工作,但我刚刚将我的代码更新到运行乘客 2.2.4 的审查服务器,而我的 2.3.4 rails 应用程序现在无法在那个盒子上启动。 乘客报告: Passenger encountered
我正在尝试使用带有 Angular 2的整页, 将其导入我的 app.module.ts 时出现以下错误。 "(SystemJS) Unexpected token ) at Obje
TFS2015 vNext 构建失败并出现记录器错误(下面附有错误消息)。根据我的调查,这看起来与 CentralLogger - "Microsoft.TeamFoundation.Distribu
计算机科学学校项目。我需要编写一个程序,其中用户声明数组的大小,然后以数字、非递减顺序填充数组,然后声明一个值 x。然后将 X 分配到适当的位置,以便整个数组按数字、非递减顺序排列。然后输出该数组。
在这 2 个方法中,inspect1 显示编译错误“Unexpected bound”而 inspect2 工作正常,为什么? public void inspect1(List u){ S
已关闭。这个问题是 not reproducible or was caused by typos 。目前不接受答案。 这个问题是由拼写错误或无法再重现的问题引起的。虽然类似的问题可能是 on-top
我正在尝试运行以下代码,但遇到了“此时意外”错误。 (echo COPY (SELECT ta.colA as name, ta.colB as user_e, ta.colC as user_n,
我有以下查询: select u.UserName, count(*) as total from Voting v join User u using (UserID) where unique (
我们有以下查询在 MSSQL 中完美运行但在 MySQL 中无法运行: select CONVERT(datetime, dateVal) as DateOccurred, itemID, COUNT
我的代码中存在缩进错误问题。它看起来是正确的...有人能指出我做错了什么吗?我的查询行不断收到错误。 def invoice_details(myDeliveryID): conn = pym
我有以下代码: int a , b , sum; cin>>a>>b; sum=a+b; cout>a>>b>>c; cout<
这个问题不太可能帮助任何 future 的访问者;它只与一个小的地理区域、一个特定的时间点或一个非常狭窄的情况有关,这些情况并不普遍适用于互联网的全局受众。为了帮助使这个问题更广泛地适用,visit
我在一个批处理文件上运行这个命令: for %I in (*.txt *.doc) do copy %I c:\test2 ...它不断返回: I was unexpected at this tim
创建查询时出现错误: 'from' unexpected 我的代码如下: @Override public Admin findByAdmin(Admin admin) {
我正在尝试运行此 python 代码,但我不断收到错误消息“意外缩进”。我不确定怎么了。间距似乎很好。有什么想法吗? services = ['Service1'] for service in
我在名为“circular_dependency”的目录中有一些 python 文件: 导入文件_1.py: from circular_dependency.import_file_2 import
我正在尝试使用 gcc 编译代码并运行可执行文件,但它抛出错误: gcc somefile.c -o somefile 编译成功。但是,当我尝试执行它时: $sh somefile 它导致:语法错误:
我是一名优秀的程序员,十分优秀!