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

'emerald new' tmp permissions #9

Open
phyro opened this issue Oct 15, 2018 · 2 comments
Open

'emerald new' tmp permissions #9

phyro opened this issue Oct 15, 2018 · 2 comments

Comments

@phyro
Copy link

phyro commented Oct 15, 2018

I think this came with the tmp copying in the new command.

> stat /tmp
  File: '/tmp'
  Size: 4096      	Blocks: 8          IO Block: 4096   directory
Device: 10305h/66309d	Inode: 7864321     Links: 29
Access: (1777/drwxrwxrwt)  Uid: (    0/    root)   Gid: (    0/    root)
...
> emerald new
⠸ Creating new project/home/phyro/Tomaz/programming/etc/sdk/tt5/emerald/node_modules/solc/soljson.js:1
(function (exports, require, module, __filename, __dirname) { var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=typeof window==="object";var ENVIRONMENT_IS_WORKER=typeof importScripts==="function";var ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){if(!Module["print"])Module["print"]=function print(x){process["stdout"].write(x+"\n")};if(!Module["printErr"])Module["printErr"]=function printErr(x){process["stderr"].write(x+"\n")};var nodeFS=require("fs");var nodePath=require("path");Module["read"]=function read(filename,binary){filename=nodePath["normalize"](filename);var ret=nodeFS["readFi

Error: EXDEV: cross-device link not permitted, rename '/home/phyro/Tomaz/programming/etc/my-dapp6/1539628196232-8796654623971703/emerald-starter-kit-master' -> '/tmp/tmp-4479MNfkPW8saJAD'

If I try doing it with sudo it's trying to use the /usr/bin/node and it fails

@shanejonas
Copy link
Contributor

I would recommend installing node via nodenv to deal with permissions issues: https://github.com/nodenv/nodenv

@phyro
Copy link
Author

phyro commented Nov 6, 2018

Ok, so the issue is that it cannot rename cross-device (I have separate partitions for root / and /home). For now a workaround suggested by @shanejonas worked for me:
export TMP=/home/phyro/tmp; npm install -g https://github.com/ETCDEVTeam/emerald.git
Seems like some packages read from TMP env variable and use this for the directory if it is defined
NOTE: for anyone having this issue, unless you put this in your .bashrc or equivalent, you'll have to run export TMP=/home/phyro/tmp before using some of the commands eg. emerald new

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