by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Dylan Piercey
@DylanPiercey
I do. Not just something you can throw up on github though?
Lukas Theis (MuwuM)
@MuwuM
yes, i will, but for compiling and bringing it up docker compose is very helpful
Ok, I'm able to reprocude in a more simple environment, now I have to delete all the unused IP-protecteted files...
Lukas Theis (MuwuM)
@MuwuM
Interesting folder are pages for the marko files and bc-marko-core for the custom build logic
Currently verion 4.21.0 (with the error is active) schwitch to 4.20.2 to get it running
Dylan Piercey
@DylanPiercey
@MuwuM thanks for creating that, it was very helpful. I’ve discovered the error is related to how Lasso is assuming valid html is valid Marko and some changes we’ve recently made to optimize Marko’s html output which broke Lasso’s assumption. There’s a couple of ways we can tackle this. We can remove Marko from Lasso, it is overkill anyways but it might take some effort to pull it out. Another option is we can pin the Marko version within Lasso.
I’ve got a couple of other things I’m looking into at the moment but hope we can get out a fix relatively quick. Thanks again for helping us find the issue :smile:
Lukas Theis (MuwuM)
@MuwuM
Thank you for investigating
Pier Bover
@PierBover
hey guys! :wave:
anyone knows how to enable Emmet on marko files in VSCode using the official Marko extension?
Dylan Piercey
@DylanPiercey
@PierBover I believe there is an emmet.includeLanguages option you can configure in vscode settings to allow for the Marko extension.
Pier Bover
@PierBover
Hey @DylanPiercey
I did that but still no Emmet on .marko files...
    "emmet.includeLanguages": {
        "marko": "html"
    }
I'm using (I think) the official extension.
Pier Bover
@PierBover
Jono Brain
@jonobrain_twitter

Hi

I've been having a play with MarkoJS - really like it so far. But one thing I am really struggling with is using the import.

I was following a guide to get Redux working, importing store.js into src/component/counter.marko

import store from './store';

store.js is in src/store.js I thought the ./ would import from the root of the app. But all that happens is it gets stuck on Compiling. No error is returned to say it couldn't find the file.

I can get it working if I specificy the path e.g. ..

import store from '../store';

Was just not sure if this is the right way to do it and don't like the fact I didn't get any kind of error

Jono Brain
@jonobrain_twitter

have exactly the same issue using

const counter = require("./reducer");

it just hangs on

WAIT Compiling...

Taylor Hunt
@tigt
I think a leading / requires from the root of the app — ./ is the same thing as leaving it off in the fist place
Jono Brain
@jonobrain_twitter

Ok. so

./ is basically from the same folder?

Taylor Hunt
@tigt
Yes, I believe so
Dylan Piercey
@DylanPiercey
@jonobrain_twitter in Marko (like in node) the paths are relative paths to other files in the file system. ./ is relative to the current file. / is from the file system root, not the root of the project.
Taylor Hunt
@tigt
you're right that the lack of a clear error message sucks, though
Dylan Piercey
@DylanPiercey
As far as the stuck compiling thing, that sounds like a bug. When using @marko/serve you can pass a —verbose option I believe which may surface the error.
Jono Brain
@jonobrain_twitter

Thanks guys, unfortunately -verbose didn't help.

Path stuff makes sense though, going to try that now.

Dylan Piercey
@DylanPiercey
@jonobrain_twitter does the error surface when you run @marko/build?
Jono Brain
@jonobrain_twitter
it fails but doesn't tell you why
Dylan Piercey
@DylanPiercey
:confused:
Jono Brain
@jonobrain_twitter
verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle app@1.0.0~prebuild: app@1.0.0
6 info lifecycle app@1.0.0~build: app@1.0.0
7 verbose lifecycle app@1.0.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle app@1.0.0~build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/jono/Dev/fulham/app/node_modules/.bin:/Users/jono/bin:/Users/jono/bin:/opt/local/bin:/opt/local/sbin:/Users/jono/.rbenv/shims:/Users/jono/.rbenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Postgres.app/Contents/Versions/latest/bin:./node_modules/.bin
9 verbose lifecycle app@1.0.0~build: CWD: /Users/jono/Dev/fulham/app
10 silly lifecycle app@1.0.0~build: Args: [ '-c', 'marko-build ./src/pages' ]
11 silly lifecycle app@1.0.0~build: Returned: code: 1 signal: null
12 info lifecycle app@1.0.0~build: Failed to exec build script
13 verbose stack Error: app@1.0.0 build: marko-build ./src/pages
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:310:20)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:310:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid app@1.0.0
15 verbose cwd /Users/jono/Dev/fulham/app
16 verbose Darwin 19.4.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build" "-verbose"
18 verbose node v12.16.3
19 verbose npm v6.14.4
20 error code ELIFECYCLE
21 error errno 1
22 error app@1.0.0 build: marko-build ./src/pages
22 error Exit status 1
23 error Failed at the app@1.0.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
now I know ./is relative to the current file though thats a big help
Dylan Piercey
@DylanPiercey
@jonobrain_twitter is it possible for you to share a reproducable example repo on GitHub?
Jono Brain
@jonobrain_twitter
Sure I'll sort that out. I have got it working now (just not with errors being shown) so I'm a lot happier
Dylan Piercey
@DylanPiercey
Not showing errors is the worst though. Would love to get that fixed if I can reproduce :smile:
Jono Brain
@jonobrain_twitter
Thanks Dylan
Jono Brain
@jonobrain_twitter
@DylanPiercey ok I've just tried webpack (npx @marko/create --template webpack ) and I get errors
32 replies
yejiel
@yejiel

Guys , weird issue, locally it all works, dev server doesnt, what we did is , add a new marko component, and we get error
Error: Cannot find module './widgets/productAds/productAdSideBar'
08:35:20 0|SearchSerp | Require stack:
08:35:20 0|SearchSerp | - /usr/src/app/views/templates/sideBar.marko
08:35:20 0|SearchSerp | - /usr/src/app/views/search.marko
08:35:20 0|SearchSerp | - /usr/src/app/views/mainPage.marko.js

and we are importing as follow

import ProductAdSideBar from "./widgets/productAds/productAdSideBar"

9 replies
André Kaufmann
@akaufmann
Hi!
Is it possible to bundle certain imports/code only in the server bundle? I know with this it is possible -> https://markojs.com/docs/server-side-rendering/
but for projects created with @marko/create, it is not possible to split .marko files (index.js & template.marko). At least I did not succeed. The server will deliver the folder structure when run marko-serve ./src/pages.
27 replies
yejiel
@yejiel
image.png
4 replies
Dilip Kola
@koladilip
is there support for building mobile apps with MarkoJs?
Taylor Hunt
@tigt
React Native style?
the docs mention it's possible in theory to do that, but no tool exists today
but you can wrap a Marko app in a WebView just fine
Taylor Hunt
@tigt
Is there a way to only build one component into a page bundle if another component is present?
the specific example is we have a stateful component that displays the current cart total
but we only actually need that component JS if there's another component that can change that total on the page
so <CartBubble>’s JS is completely unnecessary on /login, for example
Taylor Hunt
@tigt
Dunno if y'all saw this but it came up when I was looking for something unrelated: vercel/vercel#2827