node-sqlite3 icon indicating copy to clipboard operation
node-sqlite3 copied to clipboard

string-width

Open joneldiablo opened this issue 2 years ago • 2 comments

Issue Summary

stirng-width gives error install "yarn add sqlite3"

Relevant logs or output

var stringWidth = require('string-width')
                  ^

Error [ERR_REQUIRE_ESM]: require() of ES Module D:\entersol\corrales\ecosystem\electron-server\node_modules\string-width\index.js from D:\entersol\corrales\ecosystem\electron-server\node_modules\wide-align\align.js not supported.
Instead change the require of index.js in D:\entersol\corrales\ecosystem\electron-server\node_modules\wide-align\align.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (D:\entersol\corrales\ecosystem\electron-server\node_modules\wide-align\align.js:2:19)
    at Object.<anonymous> (D:\entersol\corrales\ecosystem\electron-server\node_modules\gauge\render-template.js:2:13)
    at Object.<anonymous> (D:\entersol\corrales\ecosystem\electron-server\node_modules\gauge\plumbing.js:3:22)
    at Object.<anonymous> (D:\entersol\corrales\ecosystem\electron-server\node_modules\gauge\index.js:2:16)
    at Object.<anonymous> (D:\entersol\corrales\ecosystem\electron-server\node_modules\npmlog\log.js:3:13)
    at Object.<anonymous> (D:\entersol\corrales\ecosystem\electron-server\node_modules\node-pre-gyp\lib\node-pre-gyp.js:15:11)
    at Object.<anonymous> (D:\entersol\corrales\ecosystem\electron-server\node_modules\node-pre-gyp\bin\node-pre-gyp:15:20) {
  code: 'ERR_REQUIRE_ESM'

Version

3, 4.2.5, 5.x

Node.js Version

16.X

How did you install the library?

yarn add sqlite3

joneldiablo avatar May 03 '23 23:05 joneldiablo

any news on this?

s4kh avatar May 12 '23 12:05 s4kh

I'm also experiencing this problem. But it's only specific to yarn (V1 or V2). No problems using npm.

lexGPT avatar Aug 09 '23 16:08 lexGPT