Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Cannot be used in commonjs #21

Closed
ii-ii-ii opened this issue Jun 10, 2021 · 2 comments
Closed

Cannot be used in commonjs #21

ii-ii-ii opened this issue Jun 10, 2021 · 2 comments

Comments

@ii-ii-ii
Copy link

Simply put, if I try to introduce '@plasm/types' via require, I will get an error.

index.js

require("@plasm/types")

excucte: node index.js:

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /home/...
require() of ES modules is not supported.
require() of /home/... 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.
@VadneyK
Copy link

VadneyK commented Jun 20, 2021

what version are you using? the latest 1.5.4-3 fixed the issue for me

@ii-ii-ii
Copy link
Author

Yes, it has been fixed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants