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

fix(deps): Fix Saber dev not building on Node 13+ #580

Merged
merged 1 commit into from
Jan 7, 2020

Conversation

andreasvirkus
Copy link
Contributor

Summary

There's an issue with Node 13.* as described here: ianstormtaylor/superstruct#205 and it seems that superstruct's 0.8.3 fixes this.

Currently, when running saber on Node 13+, the user gets the following error:

[ web | master ] ◉  npm run dev
> [email protected] dev /Users/anc/code/klaus/web
> saber
(node:56177) Warning: require() of ES modules is not supported.
require() of /Users/anc/code/klaus/web/node_modules/superstruct/lib/index.js from /Users/anc/code/klaus/web/node_modules/saber/dist/utils/validateConfig.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /Users/anc/code/klaus/web/node_modules/superstruct/package.json.
[error] Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/anc/code/klaus/web/node_modules/superstruct/lib/index.js
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1163:13)

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

If changing the UI/CSS related code, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

@netlify
Copy link

netlify bot commented Dec 30, 2019

Deploy preview for saber ready!

Built with commit 3e1a323

https://deploy-preview-580--saber.netlify.com

@egoist egoist changed the title Fix Saber dev not building on Node 13+ fix(deps): Fix Saber dev not building on Node 13+ Jan 7, 2020
@egoist egoist merged commit c66a83b into saberland:master Jan 7, 2020
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

Successfully merging this pull request may close these issues.

2 participants