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

Error in user profile migration #769

Closed
dhylands opened this issue Mar 19, 2018 · 5 comments
Closed

Error in user profile migration #769

dhylands opened this issue Mar 19, 2018 · 5 comments
Assignees
Milestone

Comments

@dhylands
Copy link
Contributor

I tried running the gateway today (it's been a few weeks since the last time I ran it).
I pulled the latest source from the git repository and ran yarn to update the dependencies. I also updated my node to version v8.10.0. When I tried to launch using npm start, I get the following error:

Opening database: /home/dhylands/.mozilla-iot/config/db.sqlite3
Error: EISDIR: illegal operation on a directory, copyfile '/home/dhylands/Dropbox/moziot/gateway/build/addons/http-on-off-adapter' -> '/home/dhylands/.mozilla-iot/addons/http-on-off-adapter'
    at Object.fs.copyFileSync (fs.js:1918:11)
    at Object.renameFile (/home/dhylands/Dropbox/moziot/gateway/build/webpack:/src/user-profile.js:45:1)
    at Object.migrate (/home/dhylands/Dropbox/moziot/gateway/build/webpack:/src/user-profile.js:202:1)
    at Object../src/app.js (/home/dhylands/Dropbox/moziot/gateway/build/webpack:/src/app.js:14:1)
    at __webpack_require__ (/home/dhylands/Dropbox/moziot/gateway/build/webpack:/webpack/bootstrap:22:1)
    at ./src sync recursive.webpackEmptyContext.keys (/home/dhylands/Dropbox/moziot/gateway/build/webpack:/webpack/bootstrap:74:1)
    at Object.<anonymous> (/home/dhylands/Dropbox/moziot/gateway/build/gateway.js:79:10)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
@hobinjk
Copy link
Contributor

hobinjk commented Mar 19, 2018

Likely related to #760

mrstegeman pushed a commit to mrstegeman/gateway that referenced this issue Mar 19, 2018
@ghost ghost assigned mrstegeman Mar 19, 2018
@ghost ghost added the review label Mar 19, 2018
@dhylands
Copy link
Contributor Author

It seems that fs.copyFileSync requires a file as an argument and not a directory.

@dhylands
Copy link
Contributor Author

It seems that fs-extra is already in node_modules, so we could add it to our dependencies and then do

fs = require('fs-extra')
fs.copy(src, dest)

where src can be a directory

@mrstegeman
Copy link
Contributor

@dhylands it should be fixed with #770. Just a typo.

@dhylands
Copy link
Contributor Author

Closing in favor of #770

@ghost ghost removed the review label Mar 20, 2018
@mrstegeman mrstegeman added this to the 0.4 milestone Jan 9, 2019
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