Can't resolve 'fs' when running "size-limit"

Sebastian Werner's Avatar

Sebastian Werner

10 Aug, 2017 06:35 AM

In the latest builds of my OSS project edge-core I get pretty unhelpful errors in the end of the CI run where I execute "size-limit" to detect the bundle sizes of my library. Interestingly the same worked a few versions before. The library itself tests fine and builds fine it seems. The only issue is running size limit.

Can't resolve 'fs' in 'C:\projects\edge-core\lib'
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "size"
npm ERR! node v6.11.1
npm ERR! npm v3.10.10
npm ERR! edge-core@0.4.17 size: `prepublish && size-limit`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the edge-core@0.4.17 size script 'prepublish && size-limit'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the edge-core package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! prepublish && size-limit
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs edge-core
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls edge-core
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\projects\edge-core\npm-debug.log
npm ERR! Test failed. See above for more details.
Command exited with code 1

Project is

 I mean after all "fs" is a core module in NodeJS.

Has anybody an idea why this fails?


  1. Support Staff 1 Posted by Ilya Finkelshte... on 11 Aug, 2017 12:13 AM

    Ilya Finkelshteyn's Avatar

    You happy build uses edge-core-0.4.15, unhappy one -- edge-core-0.4.16

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac