question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build error (ES module) with node v16.15.0

See original GitHub issue

Hello

Using last version of SvelteKit and node 16.15.0 i get this error :

(node:15002) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension. Unexpected token 'export'

adding "type":"module" to node_modules/@glidejs/glide/package.json fix the problem

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
julienchazalcommented, Jul 27, 2022

@jedrzejchalubek is it possible to add this feature so that we can use Glide with newer versions of Node ?

please see https://nodejs.org/api/packages.html#packagejson-and-file-extensions

thanks !

0reactions
julienchazalcommented, Sep 22, 2022

close with #623

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error [ERR_REQUIRE_ESM]: Must use import to load ES ...
I just installed the library onto my TypeScript project and I get the following error: Error [ERR_REQUIRE_ESM]: Must use import to load ES...
Read more >
Error [ERR_REQUIRE_ESM]: require() of ES Module ... not ...
The current version of node-fetch is ONLY compatible with an ESM import (using import ), not from CommonJS modules using require() .
Read more >
ECMAScript modules | Node.js v19.3.0 Documentation
Modules are defined using a variety of import and export statements. The following example of an ES module exports a function:
Read more >
CommonJS vs. ES modules in Node.js - LogRocket Blog
Learn about the differences between CommonJS and ES modules when using them in Node.js applications to organize software code.
Read more >
Import JSON in ES modules - Simon Plenderleith
Node.js now supports importing JSON files in ES modules *without* the ... backported in the next v16 (Active LTS) minor release (v16.15.0), ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found