1
0

More than 1 year has passed since last update.

ES Modulesではないwindows-1252モジュールのインストール

Posted at

タイトルの通りです。
解決に時間がかかったので共有します。

nodeのwindows-1252モジュールを普通に

npm i windows-1252

でインストールするとES Modules版がインストールされるため、node実行時に
Must use import to load ES Module / require() of ES modules is not supported
というエラーが発生します。

requireでモジュールを読み込む場合はバージョンを指定してインストールします。

npm i windows-1252@0.1.0
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0