Chron
1 month ago
164
1
General

reference error `name` not defined when importing or requiring

Posted 1 month ago by Chron

I'm using luxon js.

Here's the installation manual: https://moment.github.io/luxon/docs/manual/install.html

I have already tried:

//
const { DateTime } = require("luxon");

//
import { DateTime } from "luxon";

//
import DateTime from "luxon";

All of them gave a ReferenceError: DateTime is not defined. Is there a way to fix this?

Please sign in or create an account to participate in this conversation.