Closed eric-burel closed 5 years ago
Sounds like an issue with ES6, the faulty unexpected )
belongs to a fat arrow const proto = Object.defineProperties(() => {}, styles);
I am using Android API 23, on more recent version the error is different, I have a use of const in strict mode
.
So I guess that there is some code that is'nt transpiled, somewhere, and it breaks on old mobiles.
Edit: it seems that the chalk
module is'nt transpiled.
Edit 2: here you go, sanitize-html
is responsible for loading the 2.2.3
version of chalk in the frontend, however chalk is'nt transpiled anymore (make sense since it is a pure backend module). I opened an issue on sanitize-html
, but maybe this will require using a fork in Vulcan while it is open.
https://github.com/punkave/sanitize-html/issues/195
https://github.com/postcss/postcss/issues/1060
Edit 3: Removing chalk from sanitize-html indeed fixes the issue :)
Oh wow, glad you could track it down.
Hi, however to be fully solved I think that we need to figure out where postcss
or sanitize-html
are used in the Starter template, because there may be a misuse. Those are not frontend package, so they shouldn't have ended up in the front in the first place (I guess?).
Do you have an idea where those lib could be imported?
sanitize-html is used here:
https://github.com/VulcanJS/Vulcan/blob/master/packages/vulcan-lib/lib/modules/utils.js#L206-L222
This file is imported on the client, too, but we could extract Utils.sanitize
to be only defined on the server. It'll be a bit hacky because Utils
will have different contents on client and server, but it's not a big deal.
Oh and I don't know about postcss
…?
Hi there!
I've been experiencing some issues with older browsers (specially IE) and I tracked the error down to the package chalk
being bundled to the client. It seems that this is the very same problem, so I've created a PR to address it.
I've not been able to fully test it yet, so could you review it and see if it fixes the issue with Cordova aswell?
Btw, thanks @eric-burel for tracking the package dependency that caused chalk
being bundled to the client!
You're welcome and thanks for the PR, I had similar issue like a thousand time when using Electron, messed up client/server import is a classic of isomorphic js apps.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi, The very last version of vulcan (1.8.2) fails on startup on my machine when running an android emulator.
Here are the logs for a bare installation of the Vulcan Starter repo, after adding the android platform.