-
-
Notifications
You must be signed in to change notification settings - Fork 40
Error: Could not load view for: FlexboxLayout.Error: Cannot find module "ui/layouts/flexbox-layout" #64
Comments
Hi @newapx, I couldn't reproduce your error on a newly created application with the provided |
Hi. This error occurs if you open the page in app that contains the
My webpack.common.js is the same template:
|
The problem comes from the new nsWebpack.ExcludeUnusedElementsPlugin(), |
@newapx , The solution turned out to be pretty simple. The fix will be provided soon with the plugin. But you can also fix it in your application by updating your {
test: /\.ts$/,
loaders: [
"nativescript-dev-webpack/tns-xml-loader",
"nativescript-dev-webpack/tns-aot-loader",
"@ngtools/webpack",
]
}, to {
test: /\.ts$/,
loaders: [
"nativescript-dev-webpack/tns-aot-loader",
"@ngtools/webpack",
"nativescript-dev-webpack/tns-xml-loader",
]
}, This is needed due to changes in the behavior of the |
This is needed due to changes in the behaviour of `@ngtools/webpack` v1.2.4 fixes #64
This is needed due to changes in the behaviour of `@ngtools/webpack` v1.2.4 fixes #64
Thank you, this solution is suitable. |
Had the same issue with GridLayout. Changing the order of loaders didn't solve it but the first solution did (remove plugin registration) |
I am now getting the same error, although I am on 0.3.7 of nativescript-dev-webpack and Angular 4.0.0. |
@lukashlobil, can you paste your whole package.json? |
https://gist.github.com/lukashlobil/e7e81852cdc9e746fa7e79ac03cc6545 |
I use latest version and get error when my app run:
EXCEPTION: Uncaught (in promise): TypeError: Could not load view for: FlexboxLayout.Error: Cannot find module "ui/layouts/flexbox-layout"
EXCEPTION: Uncaught (in promise): TypeError: Could not load view for: WrapLayout.Error: Cannot find module "ui/layouts/wrap-layout"
My package.json
"dependencies": {
"@angular/common": "2.4.5",
"@angular/compiler": "2.4.5",
"@angular/core": "2.4.5",
"@angular/forms": "2.4.5",
"@angular/http": "2.4.5",
"@angular/platform-browser": "2.4.5",
"@angular/platform-browser-dynamic": "2.4.5",
"@angular/router": "3.4.5",
"form-urlencoded": "^1.5.0",
"nativescript-angular": "next",
"nativescript-background-http": "^2.4.2",
"nativescript-checkbox": "^1.2.5",
"nativescript-drop-down": "^1.5.1",
"nativescript-geolocation": "0.0.18",
"nativescript-google-maps-sdk": "^1.4.3",
"nativescript-imagepicker": "^2.4.1",
"nativescript-ios-uuid": "^1.0.0",
"nativescript-local-notifications": "^1.2.1",
"nativescript-localstorage": "^1.1.0",
"nativescript-permissions": "^1.2.2",
"nativescript-phone": "^1.2.4",
"nativescript-plugin-firebase": "^3.9.2",
"nativescript-social-share": "^1.3.2",
"nativescript-star-ratings": "^0.1.0",
"nativescript-telephony": "^1.0.2",
"nativescript-theme-core": "^1.0.2",
"nativescript-toast": "^1.4.5",
"nativescript-unit-test-runner": "^0.3.4",
"reflect-metadata": "~0.1.8",
"rxjs": "5.0.3",
"tns-core-modules": "next"
},
"devDependencies": {
"@angular/compiler-cli": "2.4.5",
"@ngtools/webpack": "^1.2.5",
"@types/googlemaps": "^3.26.1",
"@types/jasmine": "^2.5.41",
"babel-traverse": "6.22.1",
"babel-types": "6.22.0",
"babylon": "6.15.0",
"concurrently": "^3.1.0",
"copy-webpack-plugin": "~4.0.1",
"css-loader": "~0.26.0",
"extract-text-webpack-plugin": "~2.0.0-rc.0",
"htmlparser2": "~3.9.2",
"jasmine-core": "^2.5.2",
"karma": "^1.4.0",
"karma-jasmine": "^1.1.0",
"karma-nativescript-launcher": "^0.4.0",
"karma-typescript-preprocessor": "^0.3.1",
"lazy": "1.0.11",
"nativescript-css-loader": "~0.26.0",
"nativescript-dev-android-snapshot": "^0..",
"nativescript-dev-sass": "^0.4.1",
"nativescript-dev-typescript": "^0.3.6",
"nativescript-dev-webpack": "^0.3.3",
"raw-loader": "~0.5.1",
"resolve-url-loader": "~1.6.0",
"typescript": "~2.1.5",
"webpack": "^2.2.1",
"webpack-bundle-analyzer": "^2.2.1",
"webpack-sources": "~0.1.4",
"zone.js": "~0.7.4"
},
The text was updated successfully, but these errors were encountered: