forwardemail / email-templates

Create, preview (browser/iOS Simulator), and send custom email templates for Node.js. Made for @forwardemail, @ladjs, @cabinjs, @spamscanner, and @breejs.
https://forwardemail.net/docs/send-emails-with-node-js-javascript
MIT License
3.64k stars 339 forks source link

Getting error for Node FS in consolidate package dependancy. #460

Closed dilipluharibm closed 1 month ago

dilipluharibm commented 1 month ago

Describe the bug

Node.js version: v20.9.0

OS version: Sonoma 14.5

Description: getting error for the package consolidate for node:fs , this error is coming for test running in jest. see below log;

`

Cannot find module 'node:fs' from 'consolidate.js'

However, Jest was able to find:
    'lib/consolidate.js'

You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].

See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string

However, Jest was able to find:
    './mailerService.js'
    './mailerService.test.js'`

Actual behavior

Expected behavior

Code to reproduce

Checklist

titanism commented 1 month ago

If you have a PR that fixes this issue in consolidate or wherever please submit it.