Expo eas android build error: cannot copy 'C:\Users\xxx' to a subdirectory or itself, - expo

I get this error when i use this line:
eas build -p android
I am trying to build the project but it gives this error:
Error: Cannot copy 'C:\Users\xx' to a subdirectory of itself,
'C:\Users\xx\AppData\Local\Temp\eas-cli-nodejs\5897d1cd-52ae-4c3c-a5c4-577
69487c9f8-shallow-clone'

This answer may be late but I came across this in assisting a fellow dev and think I can answer this for other devs in the future at least.
So, EAS has integration capabilities with git. What that means is that for instance, when running a build command, EAS uploads a shallow clone of your repository to EAS Build. This error will come up when you do not have git setup on your machine or your project has not remote base that you're working off of.
There is a solution to disable the git integration ability for your project if you so wish. That is setting the environment variable EAS_NO_VCS=1 So when running your build command, do this instead:
Mac: EAS_NO_VCS=1 eas <command>
Windows: npx cross-env EAS_NO_VCS=1 eas <command>
Reference: https://github.com/expo/fyi/blob/main/eas-vcs-workflow.md
Hope this helps.

Related

Does eas local build require `expo publish` first?

At present we're migrating our build infrastructure from expo with turtle to use EAS local builds. One of the issues we had with turtle is the need for setting up an external web host or use expo publish before you run turtle.
Does EAS local build still require the expo publish? step before calling the eas build --local?

Yarn script fails to execute when building in Visual Studio Team Services

I managed to setup Yarn in Angular app and when I run: yarn install
it successfully installs all the packages which makes the app run with no issues.
Inside package.json I have written some scripts to help me out run the specific task (I want node_modules folder to be inside wwwroot).
"scripts": {
"install-dev": "yarn install --modules-folder ./wwwroot/node_modules",
"install-ci": "install --modules-folder ./wwwroot/node_modules",
}
When I have to install packages locally I use yarn run install-dev, which works perfectly.
However, when I need to build the project using Visual Studio Team Services, using Yarn Build and Release Tasks by Geek Learning I pass in run install-ci inside VS Team Services Arguments which fails with the following error:
VS Console.png
What I find weird is that it says Version: 1.1.1001, but under it writes yarn run v0.27.5. It seems like that version v0.27.5 does not support --modules-folder (and anyway why is it running the wrong version?).
Here is how Yarn task is configured in Visual Studio Team Services - VS Yarn task configuration.png.
I am making sure that I am in the correct branch (bower-to-yarn) as well as pointing to the Project Directory - src/MyApp where I have package.json file. Also, it says that the task should run with Version: 1.*.
Any help would be very useful. Thank you!
The reason why I have "install-ci" without yarn is because inside vsts console yarn gets loaded and does not need to be specified again. The same applies to Arguments field inside Visual Studio Team Services run install-ci.

Can't run 'ng' from VSTS agent

I'm trying to run unit tests against our AngularCLI project using our hosted VSTS build agents however it keeps running into trouble when it tries to run 'ng test'.
To resolve this I have tried to make the agent use the ng tool directly by providing the path to the tool. This hasn't worked as it looks like it's trying to run 'ng test' where the tool is rather than in the specified current working directory:
I've also tried to add it as an environment variable in Windows (we're using Windows Server 2012 to host the VSTS agent) and setting the tool in the VSTS agent as just ng however it doesn't appear to be finding the ng tool:
How can I get the VSTS agent to make use of the ng tool to run tests? We have got #angular/cli installed on the server hosting the agent.
The thing is that you won't get angular cli installed on VSTS globally as its build server is not supporting that. But the good thing you not even need cli globally installed on your agent.
All you need is npm run ng build -- prod - this way it will always run the local version. Also this way you won't need to take care of updating your global package at all.
Use npm run ng test to run tests, npm run ng e2e to run protractor. If you need to pass any more params to any of these just use --
As mentioned by #Kuncevic, to use the Angular CLI without installing it globally, you will need to use the npm run command.
To run an Angular build using Azure Devops:
Add an npm task to install dependencies (choose install for the command)
Add another npm task, but choose custom for the command. Then add your command and arguments:
run ng -- build --output-path=dist --configuration=prod
Note how npm is not a part of the command and arguments since this will be provided by the task. Also note how -- separates the command to be run and the arguments to be passed to the command.

Blockchain Hyperledger Fabric dev env setup

I am very close to set up dev environment for hyperledger fabric and following this link
https://github.com/IBM-Blockchain/learn-chaincode/blob/master/docs/setup.md
When I run this command git clone -b v0.6 http://gerrit.hyperledger.org/r/fabric
and run go build. I get following error:
can't load package: package github.com/hyperledger/fabric: no
buildable Go source files in
/Users/test/work/src/github.com/hyperledger/fabric
However when I run step 4 from the link, the build success.
cd $GOPATH/src/github.com//learn-chaincode/start
go build ./
Here build is not succeed only for http://gerrit.hyperledger.org/r/fabric.
Any thoughts?
Please suggest!
I think the manual is not precisely written here. You are not supposed to run go build . on the cloned fabric repository. The manual just states here, that if you are getting build errors later, the clone into your go sources did not work. I is not asking you to build the fabric repository. If your build command is executed in step 4, everything should be set up correctly.
Assuming you are setting up the dev environment you want to build things for that after cloning the repo. This is done with make, thus e.g. make all to build and test all.
To build chaincode later on you use go build in the folder where you have the chaincode source file.

AWS ElasticBeanstalk using Babel to build distribution before application launch

Currently I have a AWS EB stack setup using the default 64bit Amazon Linux 2016.03 v2.1.3 running Node.js AMI.
Our codebase is written in ES6 and we use Babel to transpile the code into ES5. Our current deployment process is running babel locally to build the /dist directory and commiting the dist into our git repository and using eb deploy to deploy the application to EB.
I would like to be able to remove the step of building the distribution locally and perform this operation on the EB server.
I have tried using .ebextensions with a command to execute npm run build which yields an error Return code: 127 Output: /bin/sh: npm: command not found.. I have also tried using files to insert the file into the appdeploy/pre which yields the same error. And I have tried using container_commands which also yields an error stating that npm is not available.
Which of the available deployment hooks that AWS EB provides would be the correct place to use npm run build?
You can use npm hooks.
For example:
Here I have a npm start command that fires my server but before it I have a babel . -d ./dist to compile the files on the dist directory. So I have a task called prestart ( using the npm hook pre naming convention ) that does that.