NativeScriptException:找不到模块:“stream”

时间:2016-10-15 00:10:12

标签: nativescript angular2-nativescript

升级了我的package.json中的一些项目后,我突然得到了:

Error: com.tns.NativeScriptException: Failed to find module: "stream", relative to: /app/tns_modules/

StackTrace: 
    Frame: function:'require', file:'', line: 1, column: 266
    Frame: function:'', file:'/data/data/org.nativescript.naturesnotebookmobile/files/app/tns_modules/parse5/lib/parser/stream.js', line: 3, column: 22

有什么想法吗?以前我所有角度的东西都是2.0.0,然后就可以了。这是我的package.json:

{
  "dependencies": {
    "@angular/common": "2.1.0",
    "@angular/compiler": "2.1.0",
    "@angular/core": "2.1.0",
    "@angular/forms": "2.1.0",
    "@angular/http": "2.1.0",
    "@angular/platform-browser": "2.1.0",
    "@angular/platform-browser-dynamic": "2.1.0",
    "@angular/platform-server": "2.1.0",
    "@angular/router": "3.1.0",
    "crypto-js": "^3.1.7",
    "nativescript-angular": "1.1.0",
    ... a few other things here...
    "node-geocoder": "^3.15.0",
    "oauth-signature": "^1.3.1",
    "reflect-metadata": "^0.1.8",
    "tns-core-modules": "2.3.0",
    "util": "^0.10.3"
  },
  "devDependencies": {
    "babel-traverse": "6.16.0",
    "babel-types": "6.16.0",
    "babylon": "6.12.0",
    "lazy": "1.0.11",
    "nativescript-dev-typescript": "^0.3.2",
    "typescript": "^2.0.3",
    "zone.js": "^0.6.25"
  }
}

1 个答案:

答案 0 :(得分:6)

最新版本的 nativescript-angular 不需要 { "name": "ExtendedUser", "base": "User", /* ... */ "acls": [ { "accessType": "READ", "principalType": "ROLE", "principalId": "$authenticated", "permission": "ALLOW" }, { "accessType": "WRITE", "principalType": "ROLE", "principalId": "ADMINISTRATOR", "permission": "ALLOW" } ] } 依赖。该依赖使用了导致此问题的不同版本的parse5。

只需将其删除即可。