Skip to content

Import for Node not working.

import readXlsxFile from 'read-excel-file/node' is not working for me. I am getting the following error: Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import '/home/project/node_modules/read-excel-file/node' is not supported resolving ES modules imported from /home/project/myFile.js Did you mean to import read-excel-file/node/index.commonjs.js?

Only import readXlsxFile from 'read-excel-file/node/index.commonjs.js' works.

Is this the desired behavior?