NativeScriptException:找不到模块:"stream"
NativeScriptException: Failed to find module: "stream"
在我的 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
有什么想法吗?以前我的所有 angular 都是 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"
}
}
最新版本的 nativescript-angular 不需要 @angular/platform-server
依赖。该依赖项使用导致此问题的不同版本的 parse5。
简单地删除它。
在我的 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
有什么想法吗?以前我的所有 angular 都是 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"
}
}
最新版本的 nativescript-angular 不需要 @angular/platform-server
依赖。该依赖项使用导致此问题的不同版本的 parse5。
简单地删除它。