控制台报错:

1
2
3
4
5
6
7
8
9
However I see this error

./~/adal-node/lib/util.js
Module not found: Error: Cannot resolve module 'fs' in /Users/luis.valencia/Documents/GraphSamples/Sample1/node_modules/adal-node/lib
resolve module fs in /Users/luis.valencia/Documents/GraphSamples/Sample1/node_modules/adal-node/lib
looking for modules in /Users/luis.valencia/Documents/GraphSamples/Sample1/node_modules/adal-node/lib
/Users/luis.valencia/Documents/GraphSamples/Sample1/node_modules/adal-node/lib/fs doesn't exist (module as directory)
resolve 'file' fs in /Users/luis.valencia/Documents/GraphSamples/Sample1/node_modules/adal-node/lib
resolve file

解决方案:

add this to webpack.config.js

1
target: 'node',

原文:https://stackoverflow.com/questions/40541044/module-not-found-error-cannot-resolve-module-fs-in

转载请保持原始链接

原始链接: https://ru23.com/note/9782d4af.html