Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Arguments to path.resolve must be strings #78

Closed
lsiden opened this issue Jul 12, 2015 · 6 comments
Closed

TypeError: Arguments to path.resolve must be strings #78

lsiden opened this issue Jul 12, 2015 · 6 comments

Comments

@lsiden
Copy link

lsiden commented Jul 12, 2015

gulp task watch-app throws this exception after several successful builds:

[00:59:23] Starting 'build-code'...
[00:59:23] /********************* Build Code *********************/
[00:59:23] Executed tasks:
[00:59:23]  css
[00:59:23]  requirejs
[00:59:23]  angular-templatecache
[00:59:23]  vendor-scripts
[00:59:23]  index-create
[00:59:23] Finished 'build-code' after 5.27 ms

TypeError: Arguments to path.resolve must be strings
    at Object.exports.resolve (path.js:313:15)
    at Object.exports.relative (path.js:371:18)
    at File.Object.defineProperty.get (/home/vagrant/pah/cpportal/node_modules/gulp-requirejs/node_modules/gulp-util/node_modules/vinyl/index.js:121:17)
    at DestroyableTransform.saveFile [as _transform] (/home/vagrant/pah/cpportal/node_modules/gulp/node_modules/vinyl-fs/lib/dest/index.js:36:48)
    at DestroyableTransform.Transform._read (/home/vagrant/pah/cpportal/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
    at DestroyableTransform.Transform._write (/home/vagrant/pah/cpportal/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
    at doWrite (/home/vagrant/pah/cpportal/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:237:10)
    at writeOrBuffer (/home/vagrant/pah/cpportal/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:227:5)
    at DestroyableTransform.Writable.write (/home/vagrant/pah/cpportal/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:194:11)
    at write (/home/vagrant/pah/cpportal/node_modules/gulp-plumber/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:623:24)

I have found other complaints about this but cannot tell whether they're related. I am also not sure which project this should be reported to: vinyl or vinyl-fs or something else on the stack.

In case this helps:

vagrant@vagrant-ubuntu-trusty-64:~/pah/cpportal$ npm ls vinyl
[email protected] /home/vagrant/pah/cpportal
├─┬ [email protected]
│ └─┬ [email protected]
│   └── [email protected] 
├─┬ [email protected]
│ └─┬ [email protected]
│   └─┬ [email protected]
│     └── [email protected] 
├─┬ [email protected]
│ └─┬ [email protected]
│   └── [email protected] 
└─┬ [email protected]
  └── [email protected] 

vagrant@vagrant-ubuntu-trusty-64:~/pah/cpportal$ npm ls vinyl-fs
[email protected] /home/vagrant/pah/cpportal
└─┬ [email protected]
  └── [email protected] 
@yocontra
Copy link
Member

Can I see the code that triggered this?

@lsiden
Copy link
Author

lsiden commented Jul 15, 2015

Part of the problem is that the stack trace only prints 10 frames. Do you know how to tell gulp (or node?) that I want it to print the whole stack?

@yocontra
Copy link
Member

@lsiden I think theres a module called longjohn for that

@shinnn
Copy link
Contributor

shinnn commented Jul 25, 2015

@lsiden Could you show us the option object that you passes to gulp-requirejs plugin?

@yocontra
Copy link
Member

As far as I can tell you are passing something bad to gulp.dest and it is failing to join it to the file path. Check your arguments, and I'll keep this open as a reminder that we need a better error message on invalid dest args

@yocontra
Copy link
Member

Yep, probably options.base that is bad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants