You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I currently use version 4.0.0 of os-name and was trying to update os-name 5.0.0 to get the new windows 11 display name and I noticed the below error.
`
../../../node_modules/os-name/index.js:1
({"Object.":function(module,exports,require,__dirname,__filename,global,jest){import os from 'node:os';
^^^^^^
SyntaxError: Cannot use import statement outside a module
1 | import * as os from 'os';
> 2 | const osName = require('os-name');
`
The newer version of os-name (5.0.0) has adopted ES modules and my current project setup doesn't support it.
Is there a way to support commonjs modules?
The text was updated successfully, but these errors were encountered:
Hi,
I currently use version 4.0.0 of os-name and was trying to update os-name 5.0.0 to get the new windows 11 display name and I noticed the below error.
`
../../../node_modules/os-name/index.js:1
({"Object.":function(module,exports,require,__dirname,__filename,global,jest){import os from 'node:os';
^^^^^^
`
The newer version of os-name (5.0.0) has adopted ES modules and my current project setup doesn't support it.
Is there a way to support commonjs modules?
The text was updated successfully, but these errors were encountered: