Tailwindcss: Can't use node built in modules (fs, path, etc) in config files

Created on 10 Sep 2019  路  2Comments  路  Source: tailwindlabs/tailwindcss

@serh11p's fix for watching modules in config files causes errors when require'ing node builtins like fs, path, etc.

(node:55727) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open 'fs'
    at Object.openSync (fs.js:448:3)
    at Object.readFileSync (fs.js:348:35)
    at createModule (node_modules/tailwindcss/lib/lib/getModuleDependencies.js:19:30)
    at mdl.requires.forEach.dep (node_modules/tailwindcss/lib/lib/getModuleDependencies.js:42:25)
    at Array.forEach (<anonymous>)
    at getModuleDependencies (node_modules/tailwindcss/lib/lib/getModuleDependencies.js:34:18)
    at node_modules/tailwindcss/lib/lib/registerConfigAsDependency.js:20:40

Most helpful comment

Really!
Thanks for the issue.
I will fix it and create PR at morning!
<3

All 2 comments

Really!
Thanks for the issue.
I will fix it and create PR at morning!
<3

Resolved by #1121 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spyric picture spyric  路  3Comments

smbdelse picture smbdelse  路  3Comments

rgaufman picture rgaufman  路  3Comments

dbpolito picture dbpolito  路  3Comments

chasegiunta picture chasegiunta  路  3Comments