Search code examples
androidwebpacknativescriptnativescript-cli

TypeError: global.registerWebpackModules is not a function


I'm trying to build and run NativeScript project HelloWorld with following command

$ tns run android --bundle

Project successfully built. But it crash with following errors https://gist.githubusercontent.com/webleaf/c12e71ea73a313d7df61545b5652c0ce/raw/b2d8ad7ada81569cc0c42ea5c82eb6d0c88b450c/gistfile1.txt

Errors disappear (and looks like helloworld app run ok), if I delete following strings from app/vendor.js

global.registerWebpackModules(appCssContext);
application.loadAppCss();

...because this methods unresolved.

Without --bundle opt all build ok and run ok. Don't know how to resolve this methods, when run with --bundle opt (using webpack)


Solution

  • Problem was resolved by update dependencies of tutorial template package.js (updating version of tns-core-modules).