gpt4 book ai didi

node.js - NativeScript 类型错误 : Cannot read property 'version' of undefined

转载 作者:搜寻专家 更新时间:2023-10-31 23:51:49 25 4
gpt4 key购买 nike

我们正在构建一个 NativeScript 应用程序,它停止启动并出现以下错误:

处理 node_modules 失败。类型错误:无法读取未定义的属性“版本”

nodejs版本是6.10,在7.6上同样报错

包.json

{
"description": "Mapporia",
"version": "0.0.1",
"author": "PanonicIT",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "Mapporia",

"dependencies": {
"@angular/common": "2.4.3",
"@angular/compiler": "2.4.3",
"@angular/core": "2.4.3",
"@angular/forms": "2.4.3",
"@angular/http": "2.4.3",
"@angular/platform-browser": "2.4.3",
"@angular/platform-browser-dynamic": "2.4.3",
"@angular/router": "3.4.3",
"crypto-js": "^3.1.9-1",
"email-validator": "^1.0.7",
"nativescript-angular": "1.4.0",
"nativescript-oauth": "^1.3.0",
"nativescript-theme-core": "~1.0.2",
"reflect-metadata": "~0.1.8",
"rxjs": "~5.0.1",
"tns-core-modules": "2.5.1"
},
"devDependencies": {
"nativescript-dev-android-snapshot": "^0.*.*",
"nativescript-dev-typescript": "~0.3.5",
"typescript": "~2.1.0",
"zone.js": "~0.7.2"
}
}

有什么想法吗?谢谢

最佳答案

我遇到了同样的问题,当我向我的项目添加一个新的 nativescript 插件时:

Successfully installed plugin nativescript-screen-orientation.
TypeError: Cannot read property 'version' of undefined

正如@wasyster 在他的评论中所说,删除 android 平台解决了这个问题:

tns platform remove android
tns platform add android

关于node.js - NativeScript 类型错误 : Cannot read property 'version' of undefined,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42514086/

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