Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plenti serve on fresh site creation doesnt build #32

Closed
garlandcrow opened this issue Jun 4, 2020 · 3 comments
Closed

plenti serve on fresh site creation doesnt build #32

garlandcrow opened this issue Jun 4, 2020 · 3 comments

Comments

@garlandcrow
Copy link

garlandcrow commented Jun 4, 2020

Wanted to test this out so did created a new site (both when installed via brew, or installed manually didn't make a difference).

plenti new site my-site
plenti serve

Generates this error:

internal/modules/cjs/loader.js:1172
      throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
      ^

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/username/Code/my-site/ejected/build.js
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1172:13)
    at Module.load (internal/modules/cjs/loader.js:1000:32)
    at Function.Module._load (internal/modules/cjs/loader.js:899:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
    at internal/main/run_main_module.js:18:47 {
  code: 'ERR_REQUIRE_ESM'
}
Total build took 152.0681ms

Serving site from your "public" directory.
Visit your site at http://localhost:3000/
@jimafisk
Copy link
Member

jimafisk commented Jun 4, 2020

Thanks for checking out the project! It looks like you might be using an older version of nodejs? Plenti needs version 13 or newer to support ESM.

I made a video about installing multiple versions with NVM in case it's helpful: https://youtu.be/85D5lAvWRuE

@garlandcrow
Copy link
Author

Thanks for the quick response. Sorry, totally missed the v13 requirement, that did it.

@jimafisk
Copy link
Member

jimafisk commented Jun 5, 2020

Ok nice, I'm glad it worked for you!

@jimafisk jimafisk mentioned this issue Jun 5, 2020
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants