adapt:
. To see Docker related stuff during build:
DEBUG=adapt:cloud:docker* adapt run ...
DEBUG=
to show more or less stuff.
DEBUG=adapt*
/api
to an API backend service and routes everything else to a static HTTP server (also Nginx).
adapt new hello-react-node-postgres ./some_dir
adapt new moviedb-react-node ./some_other_dir
<NodeService port={80} handle={api} srcDir="../backend" />
<NodeService port={90} handle={api2} srcDir="../backend" />
const hostname = callInstanceMethod(api, undefined, "hostname");
...
<UrlRouter port={8080} routes={[
{ path: "/api", endpoint: `http://${hostname}:80` },
{ path: "/api2", endpoint: `http://${hostname}:90` }
]} />
I'm getting a compile error when trying to run yarn build
in the cloud/
directory:
~/Projects/Adapt/adapt/cloud$ yarn build
yarn run v1.19.1
$ tsc -p tsconfig.json
src/aws/aws-sdk.ts:17:10 - error TS2305: Module '"../../../node_modules/@adpt/utils/dist/src"' has no exported member 'ciMaybeCreateLogger'.
17 import { ciMaybeCreateLogger, ciReportEnabled, makeRetryDelay } from "@adpt/utils";
~~~~~~~~~~~~~~~~~~~
src/aws/aws-sdk.ts:17:31 - error TS2305: Module '"../../../node_modules/@adpt/utils/dist/src"' has no exported member 'ciReportEnabled'.
17 import { ciMaybeCreateLogger, ciReportEnabled, makeRetryDelay } from "@adpt/utils";
~~~~~~~~~~~~~~~
src/aws/aws-sdk.ts:17:48 - error TS2305: Module '"../../../node_modules/@adpt/utils/dist/src"' has no exported member 'makeRetryDelay'.
17 import { ciMaybeCreateLogger, ciReportEnabled, makeRetryDelay } from "@adpt/utils";
~~~~~~~~~~~~~~
Found 6 errors.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
This is off of master at cb497355477d9bf0887555fd0110854fa54d580c
plus some changes to add some code into cloud/aws/.
adapt
repo directory and trying make cleaner; make build
. That will do a complete cleanup, then build everything from scratch, using the containerized dev environment instead of your local system's tools and environment. Generally speaking, you shouldn't build or test using your system's native tools and environment, but rather use the containerized version of those, which can be found in the bin
directory at the top level of the adapt repo. So instead of running yarn build
in the cloud directory, you'd run ../bin/yarn build
. And by using make
instead of directly calling yarn
, that ensures that dependencies have definitely been correctly (re-)built.
cloud/aws
changes and try make cleaner; make build
again? Then, let me know the results and I can help you troubleshoot more from there.
make cleaner && make build
fails due to no access to adapt-web repo:git clone git@gitlab.com:unboundedsystems/adapt-web.git web
Cloning into 'web'...
Warning: Permanently added the ECDSA host key for IP address '172.65.251.78' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
/src/config/build_support/web.mk:30: recipe for target 'web/.git' failed
make: *** [web/.git] Error 128
make: *** [/home/tdyas/Projects/Adapt/adapt/config/build_support/dockerize.mk:36: .DOCKER_MAKE_DONE] Error 2
make build
again. It is somewhat possible that it still gives a permissions error in that context though. If you still see the permissions error, try the manual clone as suggested above. And either way, let me know how that goes and I'll file a bug if needed.
kirkb@DESKTOP-5BF58I3 MINGW64 /e/Sites/wud/deploy
$ adapt run k8s-test --deployID app-test
[13:23:59] Installing node modules [started]
[13:24:02] Installing node modules [failed]
[13:24:02] → EBUSY: resource busy or locked, rmdir 'E:\Sites\wud\deploy'
Error: EBUSY: resource busy or locked, rmdir 'E:\Sites\wud\deploy'
Code: EBUSY