zaach / jsonlint

A JSON parser and validator with a CLI.
http://zaach.github.com/jsonlint/
1.93k stars 417 forks source link

Module not found: Error: Can't resolve 'fs' #98

Closed nicolechung closed 6 years ago

nicolechung commented 6 years ago

I am getting the following error after I install this library:

ERROR in ./node_modules/jsonlint-lines/lib/jsonlint.js
Module not found: Error: Can't resolve 'fs' in '/Users/<my username>/node_modules/jsonlint-lines/lib'
nicolechung commented 6 years ago

NVM this was actually a webpack issue.

StuRuby commented 6 years ago

I met the same question

StuRuby commented 6 years ago

add

node: {
    fs: "empty"
  }

in webpack.config.js,solve the question