Optional dependencies creating build errors - can they be ignored?
Unanswered
Masai Lion posted this in #help-forum
Masai LionOP
I am using nunjucks for generating text from templates. Nunjucks has an optional dependency on chokidar which I don't need (not dynamically loading templates). I get the following at project build (both yarn dev and yarn build):
Can I ignore this warning?
./node_modules/nunjucks/src/node-loaders.js
Module not found: Can't resolve 'chokidar' in '/Users/jmatthewpryor/proj/tana/sultana/node_modules/nunjucks/src'
Import trace for requested module:
./node_modules/nunjucks/src/node-loaders.js
./node_modules/nunjucks/src/loaders.js
./node_modules/nunjucks/index.js
./src/readwise/rendering.ts
./src/app/api/readwise/export/route.ts
./node_modules/nunjucks/src/node-loaders.js
Critical dependency: the request of a dependency is an expression
Import trace for requested module:
./node_modules/nunjucks/src/node-loaders.js
./node_modules/nunjucks/src/loaders.js
./node_modules/nunjucks/index.js
./src/readwise/rendering.ts
./src/app/api/readwise/export/route.ts
Can I ignore this warning?