Code Monkey home page Code Monkey logo

nx-plugins's Issues

Deploy fails to execute in Codebuild

Hey.

I am trying to use the plugin in AWS CodeBuild as part of the pipeline.

It fails with the following:

/codebuild/output/src304675747/src/node_modules/@codebrew/nx-aws-cdk/src/utils/executor.util.js:56
--
process.stdin.end();
 ^
 ย 
TypeError: process.stdin.end is not a function
at ChildProcess.<anonymous> (/codebuild/output/src304675747/src/node_modules/@codebrew/nx-aws-cdk/src/utils/executor.util.js:56:27)
at ChildProcess.emit (events.js:387:35)
at maybeClose (internal/child_process.js:1055:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)

CodeBuild is non-TTY environment and it looks like the fix added here b5ef5c7 might be what is causing the issue as it always tries to execute this:

process.stdin.end();
process.stdin.removeListener('data', processExitListener);

Destroy doesn't work

First issue:
In Line 10: /packages/nx-aws-cdk/executors.json
"implementation": "./src/executors/destroy/executor",
needs to be
"implementation": "./src/executors/destroy/destroy",

Second:
Once the first fix is made in my node_modules, the command works without error, though it doesn't remove the stack, and Executing command: cdk destroy is output to command line.

Side Note:
I'm using aws-cdk 2.9.0, aws-cdk-lib 2.9.0 and constructs 10.0.46, and the stack deployed just fine.

It might also help to document the process for providing the credentials via environment variables.

I personally used npm install -D env-cmd and made a .env.json in the base folder with { "AWS_ACCESS_KEY_ID": "", "AWS_SECRET_ACCESS_KEY": "" }, and added .env.json to .gitignore.

Then called npm exec env-cmd nx r cdk:deploy.

Cannot find module a dependency under libs

๐Ÿ‘‹

I'm trying to use the CDK plugin, and it generated and deployed a CDK stack just fine until I added a dependency from /libs.

For some reason, it is not able to find the dependency ๐Ÿ‘‡

> nx deploy my-api

> nx run my-api:deploy

Executing command: cdk deploy
Cannot find module '@my-org/cdk-utils'
Require stack:
- /my-api/src/main.ts
- 
- 
import * as cdk from "@aws-cdk/core";
import { getResourcePrefix } from "@my-org/cdk-utils";
import { AppStack } from "./stacks/app-stack";

const app = new cdk.App();
new AppStack(app, `${getResourcePrefix()}guides-api`);

nx test my-api still works fine - also with /libs dependencies. It seems @nrwl/jest:jest is handling these dependencies.

Is there any extra setup that needs to be added to work with /libs deps?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.