postcss / postcss-url

PostCSS plugin to rebase url(), inline or copy asset.
MIT License
377 stars 59 forks source link

TypeError: Path must be a string. Received undefined #94

Closed stevenvachon closed 7 years ago

stevenvachon commented 7 years ago
TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.resolve (path.js:1146:7)
    at prepareAsset (/project/node_modules/postcss-url/src/lib/paths.js:117:28)
    at replaceUrl (/project/node_modules/postcss-url/src/index.js:64:19)
    at decl.value.decl.value.replace (/project/node_modules/postcss-url/src/index.js:96:28)
    at RegExp.[Symbol.replace] (native)
    at String.replace (native)
    at declProcessor (/project/node_modules/postcss-url/src/index.js:95:10)
    at styles.walkDecls (/project/node_modules/postcss-url/src/index.js:117:20)
    at /project/node_modules/postcss/lib/container.js:192:28
    at /project/node_modules/postcss/lib/container.js:148:26
    at AtRule.each (/project/node_modules/postcss/lib/container.js:114:22)
    at AtRule.walk (/project/node_modules/postcss/lib/container.js:147:21)
    at /project/node_modules/postcss/lib/container.js:150:32
    at Root.each (/project/node_modules/postcss/lib/container.js:114:22)
    at Root.walk (/project/node_modules/postcss/lib/container.js:147:21)

5.x didn't have this issue.

sergcen commented 7 years ago

@stevenvachon yes, i found this bug today, fixed here (https://github.com/postcss/postcss-url/commit/b5570eabfc57b41d690d8fd976e84651b92cca62) I will release it later. Thanks for feedback :)

stevenvachon commented 7 years ago

Works. Please publish.

sergcen commented 7 years ago

@stevenvachon done

stevenvachon commented 7 years ago

Thanks!