首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >TypeError: global.moduleMerge不是函数

TypeError: global.moduleMerge不是函数
EN

Stack Overflow用户
提问于 2016-08-19 19:14:06
回答 1查看 628关注 0票数 0

在我升级到nativescript 2.2.1之后,我在运行应用程序时得到以下错误:

代码语言:javascript
复制
java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: 
Error calling module function 

TypeError: global.moduleMerge is not a function
File: "<unknown>, line: 1, column: 265

StackTrace: 
    Frame: function:'', file:'/data/data/org.nativescript.hw1/files/app/tns_modules/utils/utils.js', line: 3, column: 8
    Frame: function:'require', file:'', line: 1, column: 266
    Frame: function:'', file:'/data/data/org.nativescript.hw1/files/app/tns_modules/file-system/file-system-access.js', line: 2, column: 13
    Frame: function:'require', file:'', line: 1, column: 266
    Frame: function:'', file:'/data/data/org.nativescript.hw1/files/app/tns_modules/file-system/file-system.js', line: 1, column: 86
    Frame: function:'require', file:'', line: 1, column: 266
    Frame: function:'', file:'/data/data/org.nativescript.hw1/files/app/tns_modules/nativescript-angular/file-system/ns-file-system.js', line: 2, column: 21
    Frame: function:'require', file:'', line: 1, column: 26

我已经尝试删除./node_modules和./platform文件夹,以确保所有内容都是最新的,但这无济于事。

以下是我的依赖项(来自package.json):

代码语言:javascript
复制
    "dependencies": {
    "@angular/common": "2.0.0-rc.4",
    "@angular/compiler": "2.0.0-rc.4",
    "@angular/core": "2.0.0-rc.4",
    "@angular/http": "2.0.0-rc.4",
    "@angular/platform-browser": "2.0.0-rc.4",
    "@angular/platform-browser-dynamic": "2.0.0-rc.4",
    "@angular/platform-server": "2.0.0-rc.4",
    "@angular/router": "3.0.0-beta.2",
    "@angular/router-deprecated": "2.0.0-rc.2",
    "nativescript-angular": "next",
    "reflect-metadata": "^0.1.5",
    "tns-core-modules": "2.2.1",
    "email-validator": "^1.0.4",
    "nativescript-social-share": "^1.2.0"
  },
  "devDependencies": {
    "babel-traverse": "6.13.0",
    "babel-types": "6.13.0",
    "babylon": "6.9.0",
    "lazy": "1.0.11",
    "nativescript-dev-typescript": "^0.3.2",
    "typescript": "^1.8.10"
  }
EN

回答 1

Stack Overflow用户

发布于 2016-08-24 21:25:56

遵循Alexander Vakrilov的建议,在这里issue 393,并确保main.ts中的第一个导入是import {nativeScriptBootstrap} from "nativescript-angular/application";解决了这个问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39037660

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档