marko-js / cli

command-line tools for Marko
MIT License
94 stars 36 forks source link

marko create does not work on node 12 #140

Closed colinbreame closed 4 years ago

colinbreame commented 5 years ago

marko-cli@7.0.15

Using node v12.9.1 (npm v6.10.2)

Details

Following the instructions on this page https://markojs.com/docs/installing/

$ marko create test
fs.js:27
const { Math, Object } = primordials;
                         ^

ReferenceError: primordials is not defined
    at fs.js:27:26
    at req_ (/home/breamec/.config/yarn/global/node_modules/natives/index.js:143:24)
    at Object.req [as require] (/home/breamec/.config/yarn/global/node_modules/natives/index.js:55:10)
    at Object.<anonymous> (/home/breamec/.config/yarn/global/node_modules/fstream/node_modules/graceful-fs/fs.js:1:37)
    at Module._compile (internal/modules/cjs/loader.js:936:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:947:10)
    at Module.load (internal/modules/cjs/loader.js:790:32)
    at Function.Module._load (internal/modules/cjs/loader.js:703:12)
    at Module.require (internal/modules/cjs/loader.js:830:19)
    at require (internal/modules/cjs/helpers.js:68:18)

Expected Behavior

Project folder should be created.

Actual Behavior

Error message.

Possible Fix

Downgrading to the LTS version of node (v10.16.3 (npm v6.9.0)) fixes the issue.

Your Environment

Linux but this also happens on Windows.

gavinmcfarland commented 5 years ago

I can confirm this happens on macOS as well.

A fix for me was to downgrade to an earlier version of Node as you said with NVM using nvm use 11.15.0. Then after you've created your site you can upgrade back.

rvvvt commented 4 years ago

I can confirm this happens on macOS as well.

A fix for me was to downgrade to an earlier version of Node as you said with NVM using nvm use 11.15.0. Then after you've created your site you can upgrade back.

thank you - this worked for me macOS 10.15.13

mlrawlings commented 4 years ago

A new version has been published that works with Node 12