Module not found: Error: Can’t resolve ‘fs’

three.js 모듈중 ttf 로더를 사용 했을 경우 nuxt build error 가 발생하였다.

opentype.module.js 내부에서 nodejs 의 ‘fs’ 라는 모듈을 사용하는데 nuxt 에서 이 키워드가 충돌 되나 보다. nuxt config 에서 해당 키워드를 지워주면 에러가 사라진다.

https://alithedeveloper.tistory.com/entry/node-gyp-build-%EC%97%90%EB%9F%AC-Module-not-found-Error-Cant-resolve-fs-in-path