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
Adding export default to the main code causes CommonJS bundles to include .default and returns an error if not:
C:\Users\davet\Documents\sudokutest\index.js:15
console.log("Empty: ", sudoku.findAllEmpty(grid));
^
TypeError: sudoku.findAllEmpty is not a function
at Object.<anonymous> (C:\Users\davet\Documents\sudokutest\index.js:15:31)
at Module._compile (node:internal/modules/cjs/loader:1565:14)
at Object..js (node:internal/modules/cjs/loader:1708:10)
at Module.load (node:internal/modules/cjs/loader:1318:32)
at Function._load (node:internal/modules/cjs/loader:1128:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:219:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
at node:internal/main/run_main_module:36:49
Node.js v22.12.0
With .default
Without .default
The text was updated successfully, but these errors were encountered:
Adding
export default
to the main code causes CommonJS bundles to include .default and returns an error if not:With .default
Without .default
The text was updated successfully, but these errors were encountered: