borodean / postcss-assets

An asset manager for PostCSS
MIT License
537 stars 32 forks source link

Error: Cannot find module 'calipers-webp' #80

Closed elliott-impression closed 5 years ago

elliott-impression commented 6 years ago

Hello,

I am trying to run postcss-assets with my current Gulp set up, however, when I run my watch command I now hit this error when I include this plugin:

Error: Cannot find module 'calipers-webp'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at /Users/.../packages/node_modules/.registry.npmjs.org/calipers/2.0.1/node_modules/calipers/lib/index.js:33:14
    at Array.map (<anonymous>)
    at module.exports (/Users/.../packages/node_modules/.registry.npmjs.org/calipers/2.0.1/node_modules/calipers/lib/index.js:29:22)
    at Object.<anonymous> (/Users/.../packages/node_modules/.registry.npmjs.org/assets/3.0.0/node_modules/assets/lib/size.js:1:97)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at /Users/.../packages/node_modules/.registry.npmjs.org/assets/3.0.0/node_modules/assets/lib/index.js:14:22

Help is very much appreciated, Elliott

borodean commented 5 years ago

@elliott-impression this is a known issue of assets/calipers. Try explicitly installing the Calipers' plugins to resolve the problem:

npm install calipers-jpeg calipers-png calipers-svg calipers-webp --save