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

Cannot read property 'createChild' of null #12

Closed
haroldo-ok opened this issue Aug 14, 2017 · 2 comments
Closed

Cannot read property 'createChild' of null #12

haroldo-ok opened this issue Aug 14, 2017 · 2 comments

Comments

@haroldo-ok
Copy link

haroldo-ok commented Aug 14, 2017

I'm trying to do a simple test:

const memfs = require('memfs');
memfs.fs.writeFileSync('/watson.json', JSON.stringify({
	"ocorrencia_id": 9001
}));

And, instead of writing things to the file, I'm getting this error:

TypeError: Cannot read property 'createChild' of null
	at Volume.createLink (C:\Temp\teste-watson\watson-orchestrator\node_modules\memfs\lib\volume.js:382:22)
	at Volume.openFile (C:\Temp\teste-watson\watson-orchestrator\node_modules\memfs\lib\volume.js:641:29)
	at Volume.openBase (C:\Temp\teste-watson\watson-orchestrator\node_modules\memfs\lib\volume.js:649:25)
	at Volume.writeFileBase (C:\Temp\teste-watson\watson-orchestrator\node_modules\memfs\lib\volume.js:878:23)
	at Volume.writeFileSync (C:\Temp\teste-watson\watson-orchestrator\node_modules\memfs\lib\volume.js:903:14)
	at client.query.then.res (C:\Temp\teste-watson\watson-orchestrator\populate\populate.js:37:12)
	at process._tickCallback (internal/process/next_tick.js:109:7)

In fact, all of the examples are giving off this error.

@streamich
Copy link
Owner

streamich commented Aug 14, 2017

The issue is with Windows paths, pls try version 2.0.8

npm install --save memfs@2.0.8

@haroldo-ok
Copy link
Author

Thanks; I already solved my original problem in a different way, but I will remember this detail next time I use memfs.

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