728x90

버전이 4.x.x일때는 잘 작동되던 코드가 truffle 버전이 5.x.x 되고나서 나타나는 에러이다.

 

해결방법 1. require -> import 로 바꾸면 해결된다.

 

해결방법 2. Truffle 다운그레이드

npm uninstall -g truffle

npm install -g truffle@4.x.x

 

 

It is esm only in 5.x
You can still use a dynamic import to import it in node at least afaik, but should probably just stick to 4.x until you can migrate to esm (feature set shouldn't be much different)

 

https://github.com/chaijs/chai/issues/1561

 

ERR_REQUIRE_ESM in v5 · Issue #1561 · chaijs/chai

Hi there, I don't have all the details, as I don't have access to my workstation right now, but our CI is failing with this error for all our projects using chai when trying an upgrade to chai@5. T...

github.com

 

728x90

+ Recent posts