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

fsExtra.move(filepath, newPath) broken; #128

Closed
luozhihua opened this issue Apr 20, 2015 · 3 comments
Closed

fsExtra.move(filepath, newPath) broken; #128

luozhihua opened this issue Apr 20, 2015 · 3 comments

Comments

@luozhihua
Copy link

TypeError: Cannot read property 'mkdirp' of undefined
  at Object.fs.move (/Users/colin/Projects/magicscenes/node_modules/fs-extra/lib/index.js:50:11)
  at Object.module.exports.exports.uploader [as handle] (/Users/colin/Projects/magicscenes/mock-server.js:181:13)
  at next (/Users/colin/Projects/magicscenes/node_modules/grunt-contrib-connect/node_modules/connect/lib/proto.js:194:15)
  at Function.app.handle (/Users/colin/Projects/magicscenes/node_modules/grunt-contrib-connect/node_modules/connect/lib/proto.js:202:3)
  at Object.fn [as handle] (/Users/colin/Projects/magicscenes/node_modules/grunt-contrib-connect/node_modules/connect/lib/proto.js:74:14)
  at next (/Users/colin/Projects/magicscenes/node_modules/grunt-contrib-connect/node_modules/connect/lib/proto.js:194:15)
  at next (/Users/colin/Projects/magicscenes/node_modules/grunt-contrib-connect/node_modules/connect/lib/proto.js:130:23)
  at next (/Users/colin/Projects/magicscenes/node_modules/grunt-contrib-connect/node_modules/connect/lib/proto.js:169:78)
  at Function.app.handle (/Users/colin/Projects/magicscenes/node_modules/grunt-contrib-connect/node_modules/connect/lib/proto.js:202:3)
  at Object.fn [as handle] (/Users/colin/Projects/magicscenes/node_modules/grunt-contrib-connect/node_modules/connect/lib/proto.js:74:14)
  at next (/Users/colin/Projects/magicscenes/node_modules/grunt-contrib-connect/node_modules/connect/lib/proto.js:194:15)
  at next (/Users/colin/Projects/magicscenes/node_modules/grunt-contrib-connect/node_modules/connect/lib/proto.js:130:23)
  at Form.<anonymous> (/Users/colin/Projects/magicscenes/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/multipart.js:154:29)
  at Form.emit (events.js:129:20)
  at /Users/colin/Projects/magicscenes/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/multiparty/index.js:539:12
  at process._tickDomainCallback (node.js:381:11)
@jprichardson
Copy link
Owner

Will you paste the snippet that you're calling it with?

@jprichardson
Copy link
Owner

Oh, you're not passing in a callback, that's why.

Do this:

fs.move(oldPath, newPath, function (err) {
  console.dir(err)
})

@luozhihua
Copy link
Author

Thanks!

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

2 participants