Skip to content
This repository has been archived by the owner on Jan 24, 2020. It is now read-only.

Issue on running on Ubuntu #13

Open
hmuhdkamran opened this issue Jan 25, 2018 · 7 comments
Open

Issue on running on Ubuntu #13

hmuhdkamran opened this issue Jan 25, 2018 · 7 comments
Assignees

Comments

@hmuhdkamran
Copy link
Collaborator

While developing on the Windows the application works fine, but when you switch the application to Ubuntu, webpack and everything work fine, but while running on browser it gives the error
SyntaxError: expected expression, got '<' [Learn More] common.js:1 SyntaxError: expected expression, got '<' [Learn More] vendor.js:1 SyntaxError: expected expression, got '<' [Learn More] app.js:1 TypeError: window.bootstrap.loadApp is not a function [Learn More] mount.js:1366:9 onComplete http://localhost:5000/mount.js:1366:9 onLoad http://localhost:5000/mount.js:4191:61 load/</resource.el< http://localhost:5000/mount.js:4199:21 loadStyle/el.onload http://localhost:5000/mount.js:4247:26

@hmuhdkamran
Copy link
Collaborator Author

Issue has been resolved https://github.com/mrellipse/toucan/issues/12

@hmuhdkamran
Copy link
Collaborator Author

now Issue while lazy loading . . .
[vue-router] Failed to resolve async component default: TypeError: modules[moduleId] is undefined
TypeError: modules[moduleId] is undefined Stack trace: __webpack_require__@http://localhost:5000/common.js:55:12 @webpack-internal:///212:1:28 [212]@http://localhost:5000/1.js:44:1 __webpack_require__@http://localhost:5000/common.js:55:12 @webpack-internal:///211:4:15 [211]@http://localhost:5000/1.js:37:1 __webpack_require__@http://localhost:5000/common.js:55:12 @webpack-internal:///194:17:1 [194]@http://localhost:5000/1.js:7:1 __webpack_require__@http://localhost:5000/common.js:55:12 AreaLayout/</<@webpack-internal:///173:22:170 AreaLayout/<@webpack-internal:///173:22:115

@mrellipse
Copy link
Owner

it sounds like the server was perhaps returning html instead javascript? if the fix leads you to believe that there is a problem in the default project build/deploy process on linux, just let me know how to reproduce it, and I will figure out a fix.

I have never actually compiled ui project directly on linux - for our staging and production sites, I build the web project assets on windows, and then import the /dist/wwwroot/**/* when building a docker image based on FROM microsoft/aspnetcore:1.1

@mrellipse
Copy link
Owner

not sure about the async components while lazy loading. what build are you running on the server? dev or prod? since it references localhost in the stack trace, I am assuming dev build ...

Without having many details, a pretty wild guess on my part would be that minification or some other webpack loader doing optimizations could be an issue? I had to drop using uglifyjs from the production build a while back, and started using babel minify as per 0d9fd due to it not handling es6?

@hmuhdkamran
Copy link
Collaborator Author

While building ui on linux (webpack), and applying lazy loading the application split the application in small parts / junks.
when you start application it doesn't find the parts.
suppose use
const Home = resolve => (require as any)(['../home/home'], function (module){ resolve(module.Home) });
instead of
import { Home } from '../home/home';
and webpack the application, it will generate app.js and 01.js, when you are loading application in windows it work fine, while loading on linux based system it says that there is no junk/part. which is trouble some .

@hmuhdkamran
Copy link
Collaborator Author

As on testing and debugging on Ubunto 16.04 and 17.10 and apply lazy loading as mentioned above, application doesn't recognize chunks.
And on Ubuntu it didn't watch changes, https://github.com/webpack/webpack/issues/2239

@hmuhdkamran
Copy link
Collaborator Author

Webpack application on Ubuntu 17.10, it gives allot errors, second while running the application gives error that it can't find common.js, vendor.js, app.js etc.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants