question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Possibly unhandled Error: path should be string

See original GitHub issue

I’m getting the following error:

Possibly unhandled Error: path should be string
    at File.Object.defineProperty.set (/Users/benjaminrh/appem/node_modules/gulp/node_modules/vinyl-fs/node_modules/vinyl/index.js:166:41)
    at Function.assign (/Users/benjaminrh/appem/node_modules/gulp-cache/node_modules/lodash-node/modern/objects/assign.js:63:21)
    at /Users/benjaminrh/appem/node_modules/gulp-cache/lib/TaskProxy.js:20:19
    at tryCatch1 (/Users/benjaminrh/appem/node_modules/gulp-cache/node_modules/bluebird/js/main/util.js:64:19)
    at Promise$_callHandler [as _callHandler] (/Users/benjaminrh/appem/node_modules/gulp-cache/node_modules/bluebird/js/main/promise.js:708:13)
    at Promise$_settlePromiseFromHandler [as _settlePromiseFromHandler] (/Users/benjaminrh/appem/node_modules/gulp-cache/node_modules/bluebird/js/main/promise.js:724:18)
    at Promise$_settlePromiseAt [as _settlePromiseAt] (/Users/benjaminrh/appem/node_modules/gulp-cache/node_modules/bluebird/js/main/promise.js:896:14)
    at Promise$_fulfillPromises [as _fulfillPromises] (/Users/benjaminrh/appem/node_modules/gulp-cache/node_modules/bluebird/js/main/promise.js:1041:14)
    at Async$_consumeFunctionBuffer [as _consumeFunctionBuffer] (/Users/benjaminrh/appem/node_modules/gulp-cache/node_modules/bluebird/js/main/async.js:64:12)
    at Async$consumeFunctionBuffer (/Users/benjaminrh/appem/node_modules/gulp-cache/node_modules/bluebird/js/main/async.js:37:14)

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
BenjaminRHcommented, Sep 9, 2014

Yeah! I’m wrapping it around my image minifier, the section from the gulp task looks like this:

return gulp.src(paths.images)
    .pipe($.cache($.imagemin({
        progressive: true,
        interlaced: true
    })))
    .pipe(gulp.dest(paths.imageDist));

Removing the $.cache there makes everything work normally.

0reactions
LukyVjcommented, Sep 13, 2014

Thank you @BenjaminRH for the hint. I removed $.cache() and it works now 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Path must be a string. Received undefined" #144 - zkat/npx
Happy to try to help. The reason people all over www get 'Path must be a string' in Windows is because it it...
Read more >
stat: path should be string, bytes, os.PathLike or integer, not ...
It looks like StanfordNERTagger wants file paths, which it will use to open the files, but you've given it open file handles. –...
Read more >
How to Avoid the Infamous "Cannot read properties of ... - Bitovi
As a JavaScript developer, I'm sure you've encountered the frustrating runtime TypeError Cannot read properties of undefined .
Read more >
Troubleshooting Common Errors - Gatsby
Another possibility that could cause this issue is from empty strings used for image paths somewhere in your site. If this is the...
Read more >
Fatal Error C1083 | Microsoft Learn
There are many possible causes for this error. An incorrect include search path or missing or misnamed header files are the most common...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found