Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
    I'm getting an error on awly init
    HTTPS server listening on port: 8443.
    MarkoJS version: 4.6.3
    Hot reload ACTIVE!
    Visit your page on: https://localhost:8443
            throw createError(
    Error: Unable to compile template at path "/home/richard/code/awly/src/components/vendor/awly/awly-hot-reload/index.marko". Error: Cannot read property 'type' of undefined
        at transformNode (/home/richard/node_modules/marko/src/compiler/Compiler.js:34:13)
        at transformTreeHelper (/home/richard/node_modules/marko/src/compiler/Compiler.js:46:5)
        at /home/richard/node_modules/marko/src/compiler/Compiler.js:57:9
        at ArrayContainer.forEach (/home/richard/node_modules/marko/src/compiler/ast/ArrayContainer.js:18:26)
        at TemplateRoot.forEachChild (/home/richard/node_modules/marko/src/compiler/ast/Node.js:142:23)
    Matej Šircelj
    Hi Richard! And welcome to the Awly gitter channel! I could not reproduce your problem for now but I will try again. There is some more output that I am interested in there should be a couple more lines before the output that you posted. I am most interested in the line which should look like this: "MarkoJS path in node_modules is: @awly/marko/" If you run the "awly serve" command now do you get the same message?
    You can try to remove the hot reload component from the layout "/src/layouts/vendor/awly/blank/index.marko" and commen out the "<awly-hot-reload show-only-in-stage("dev") />" line. This should get rid of this error but I would like to get to the bottom of this.
    Matej Šircelj
    I think Awly is picking up the wrong marko. Can you try uninstalling the marko that you have in the /home/richard/node_modules and run awly serve, if it makes any difference?
    Matej Šircelj
    @rhaven-pinterest Thank you for reporting this problem. Hopefully I fixed it with the new version. Please try installing it again. There were actually two problems in one. The Awly uses its own MarkoJS fork which is forked from version 4.6.0 There are some features added and also some bugs were introduced in later MarkoJS versions. One of which is also the problem you were experiencing. The way MarkoJS loads its parts is through CommonJS require and it can pick up any version of MarkoJS that you have in your node import paths. That way MarkoJS from /home/richard/node_modules/marko got picked up instead of the one bundled with awly which should be in /home/richard/code/awly/node_modules/@awly/marko. This is probably the later version of MarkoJS which produced the bug. I fixed it by making sure that only the Awly bundled MarkoJS library gets picked up.
    I opened a new VM of Ubuntu 16 and ran into the same problem.
    Until you have a robust installation protocol, I am blocked.
    Thank you for your support, and I look forward to evaluative alwy in the future
    Matej Šircelj
    @rhaven-pinterest I am sorry to hear that you are still having problems. I updated Awly to the latest MarkoJS now and ran the installation process on my machine and it went through for me. Can you please try again. My installation on an Ubuntu VM is as follows:
    • install node & npm
    • install marko lib in the user folder (as I believe this was causing problems before):
      cd ~
      npm install marko
    • install awly globally:
      sudo npm i awly -g --unsafe-perm
    • make a folder for the project
      mkdir awly && cd awly
    • run awly init inside this folder
      awly init
    Can you please try again and report if you get any errors. I got only two deprecation warnings when the server started. I will do my best to help you out setting everything up.