nativescript@6.3.3 pr-6ren">
gpt4 book ai didi

node.js - npm 错误!解析 '...ob":"^7.0.0","istanbu' 附近时 JSON 输入意外结束

转载 作者:太空宇宙 更新时间:2023-11-04 03:13:22 25 4
gpt4 key购买 nike

由于今天 nativesctipt 不起作用,几乎我用 npm 执行的任何操作都会出现此错误

$ npm install -g nativescript

> nativescript@6.3.3 preuninstall /home/me/.local/lib/node_modules/nativescript
> node preuninstall.js

npm ERR! Unexpected end of JSON input while parsing near '...ob":"^7.0.0","istanbu'

npm ERR! A complete log of this run can be found in:
npm ERR! /home/me/.npm/_logs/2020-01-25T18_13_57_681Z-debug.log
Error while loading nativescript-starter-kits is: Command npm failed with exit code 1
/home/me/.local/bin/tns -> /home/me/.local/lib/node_modules/nativescript/bin/tns
/home/me/.local/bin/nativescript -> /home/me/.local/lib/node_modules/nativescript/bin/tns

> nativescript@6.3.3 postinstall /home/me/.local/lib/node_modules/nativescript
> node postinstall.js

npm ERR! Unexpected end of JSON input while parsing near '...ob":"^7.0.0","istanbu'

npm ERR! A complete log of this run can be found in:
npm ERR! /home/me/.npm/_logs/2020-01-25T18_14_05_772Z-debug.log
Error while loading nativescript-starter-kits is: Command npm failed with exit code 1
ENOENT: no such file or directory, open '/home/me/.local/share/.nativescript-cli/extensions/node_modules/nativescript-starter-kits/package.json'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/nativescript/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ nativescript@6.3.3
updated 1 package in 24.848s

最佳答案

尝试以下步骤:

  1. 清除 npm 缓存

    npm 缓存清理

  2. 安装软件包。

    npm install -g nativescript

注意:如果仍然不起作用,请执行npm cache clean --force,然后安装

关于node.js - npm 错误!解析 '...ob":"^7.0.0","istanbu' 附近时 JSON 输入意外结束,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59912117/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com