Giter Club home page Giter Club logo

Comments (21)

wickstargazer avatar wickstargazer commented on May 24, 2024 3

Hey guys, we will be upgrading the nx-plugin workspace and dependencies to nx 11. But it will take us some time. We welcome collaborators and i do have a branch to begin with as well

so the main issue is this --> @nrwl/workspace/src/utils/fileutils so we should just refactor this out?

from nx-plugins.

mandarini avatar mandarini commented on May 24, 2024 2

Hi there @Nightbr. Thanks for pointing out the Nx-related issue. I only came here to tell that upgrading to 11.3.x fixes the utils/utilities discrepancy, but I see you already found this fix! :) I'll be watching this issue in case some other Nx bug comes up.

from nx-plugins.

wickstargazer avatar wickstargazer commented on May 24, 2024 2

@dbrody i refactored the generators over the weekend. Its building now but i have to migrate the workspace to version that has some new commands.
i am trying to do that atm. But i think we can do a pre-release to test run it first. i will push to the new branch at the end of the day. You are welcome to review the PR together

from nx-plugins.

wickstargazer avatar wickstargazer commented on May 24, 2024 1

@jbojcic1 @dbrody @Nightbr i have published 1.0.0-beta.3 the main commands are working now
build, serve, deploy, destroy

known issue: need to add aws-lambda to package.json on init or build will have skipped error

have to test out sls and compile. Finish the unit test fix docs and release the 1.0.0!

from nx-plugins.

jbojcic1 avatar jbojcic1 commented on May 24, 2024

I am willing to help with this if needed

from nx-plugins.

wickstargazer avatar wickstargazer commented on May 24, 2024

Hi@ @jbojcic1 i have a branch thats migrated but there are bugs and tests that needs to be written.
Atm i am trying to focus on version 0.5.3 to make the experience better and less buggy then move to migration
would you like to help on that?

from nx-plugins.

jbojcic1 avatar jbojcic1 commented on May 24, 2024

@wickstargazer sure. Let me know what exactly do you need help with and I'll see what I can do

from nx-plugins.

Nightbr avatar Nightbr commented on May 24, 2024

Hey, I'm using Nx 11 and try to make @flowaccount/nx-serverless works with it.

Here is the Nx report:

>  NX  Report complete - copy this into the issue template

  Node : 12.20.1
  OS   : linux x64
  yarn : 1.22.5
  
  nx : Not Found
  @nrwl/angular : Not Found
  @nrwl/cli : 11.2.10
  @nrwl/cypress : 11.2.10
  @nrwl/devkit : 11.2.10
  @nrwl/eslint-plugin-nx : 11.2.10
  @nrwl/express : 9.2.2
  @nrwl/jest : 11.2.10
  @nrwl/linter : 11.2.10
  @nrwl/nest : 11.2.10
  @nrwl/next : Not Found
  @nrwl/node : 11.2.10
  @nrwl/react : 11.2.10
  @nrwl/schematics : Not Found
  @nrwl/tao : 11.2.10
  @nrwl/web : 11.2.10
  @nrwl/workspace : 11.2.10
  typescript : 4.1.3

I have installed yarn add -D @flowaccount/nx-serverless which has installed 0.5.2.

I can generate a lambda function with nx g @flowaccount/nx-serverless:api-serverless --name=dummy --provider=aws

But when I want to nx serve lambda-dummy or deploy or another command, it throws this error:

Cannot find module '@nrwl/workspace/src/utils/fileutils'
Require stack:
- /home/PATH/node_modules/@flowaccount/nx-serverless/src/utils/serverless.config.js
- /home/PATH/node_modules/@flowaccount/nx-serverless/src/builders/build/build.impl.js
- /home/PATH/node_modules/@nrwl/tao/node_modules/@angular-devkit/architect/node/node-modules-architect-host.js
- /home/PATH/node_modules/@nrwl/tao/node_modules/@angular-devkit/architect/node/index.js
- /home/PATH/node_modules/@nrwl/tao/src/commands/ngcli-adapter.js
- /home/PATH/node_modules/@nrwl/tao/src/commands/run.js
- /home/PATH/node_modules/@nrwl/tao/index.js
- /home/PATH/node_modules/@nrwl/cli/lib/run-cli.js

Ready to help & test if someone is working on this 👌 Let me know how I can help.

Seems related #63 (comment)
Maybe this is related too: nrwl/nx#4887

EDIT:

Uprading to Nx 11.3.2 fix the issue with the missing fileutils:

>  NX  Report complete - copy this into the issue template

  Node : 12.20.1
  OS   : linux x64
  yarn : 1.22.5
  
  nx : Not Found
  @nrwl/angular : Not Found
  @nrwl/cli : 11.3.2
  @nrwl/cypress : 11.3.2
  @nrwl/devkit : 11.3.2
  @nrwl/eslint-plugin-nx : 11.3.2
  @nrwl/express : 9.2.2
  @nrwl/jest : 11.3.2
  @nrwl/linter : 11.3.2
  @nrwl/nest : 11.3.2
  @nrwl/next : Not Found
  @nrwl/node : 11.3.2
  @nrwl/react : 11.3.2
  @nrwl/schematics : Not Found
  @nrwl/tao : 11.3.2
  @nrwl/web : 11.3.2
  @nrwl/workspace : 11.3.2
  typescript : 4.1.3

But now I have another issue:

$ nx serve lambda-dummy
> nx run lambda-dummy:serve 
Invalid format version detected - Expected:[ 1 ] Found: [ 2 ]

It was on the workspace.json: "version": 2 but If I change it to "version": 1,, another error is triggered:

$ nx serve lambda-dummy
> nx run lambda-dummy:serve 
Cannot read property 'split' of undefined

Note: angular-devkit versions

    "@angular-devkit/architect": "0.1101.4",
    "@angular-devkit/build-angular": "~0.1100.1",

from nx-plugins.

cpwingert avatar cpwingert commented on May 24, 2024

Is there any update / workaround for this issue? I am running into the same problem.

from nx-plugins.

Sam-Dietrich avatar Sam-Dietrich commented on May 24, 2024

Likewise also running into this issue

from nx-plugins.

icedevera avatar icedevera commented on May 24, 2024

Running into this issue as well

from nx-plugins.

goldsam avatar goldsam commented on May 24, 2024

Can you push your branch? I might have a little free time in the next week to help with this.

from nx-plugins.

wickstargazer avatar wickstargazer commented on May 24, 2024

hi @goldsam @jbojcic1 lets get this working, i am going to refactor it out. we can take it out in the current master make it work with 11 then migrate. What do you think?

from nx-plugins.

wickstargazer avatar wickstargazer commented on May 24, 2024

@goldsam by the way this is the branch although the name is obscure hotfix/make-nx-serverless-run-with-npm

from nx-plugins.

jbojcic1 avatar jbojcic1 commented on May 24, 2024

@wickstargazer unfortunately I don't have time to help on this anymore. Will ping you if that changes

from nx-plugins.

wickstargazer avatar wickstargazer commented on May 24, 2024

@jbojcic1 no worries i have been digging around, seems like i have to remove all imports from workspace ( i built the plugin during when there was no devkit) and the generators has changed their structure. So lets see how that goes...probably will need help testing it out to make sure i dont break it.

from nx-plugins.

dbrody avatar dbrody commented on May 24, 2024

Any update on this thread? I'm curious to use this with a new NX project.

from nx-plugins.

wickstargazer avatar wickstargazer commented on May 24, 2024

hey guys,
i am still stuck with this error when compiling the nx-serverless. But as a good sign its just some rxjs version change of sytanx error.

anyone has an idea ? the branch is --> migrate/serverless-2

Compiling TypeScript files for project "nx-serverless"...
libs/nx-serverless/src/utils/target.schedulers.ts:21:9 - error TS2345: Argument of type 'MonoTypeOperatorFunction<BuilderOutput>' is not assignable to parameter of type 'OperatorFunction<BuilderOutput, BuilderOutput>'.
  Types of parameters 'source' and 'source' are incompatible.
    Type 'import("D:/Projects/opensource/flowaccount-nx-plugins/node_modules/rxjs/internal/Observable").Observable<import("D:/Projects/opensource/flowaccount-nx-plugins/node_modules/@angular-devkit/architect/src/api").BuilderOutput>' is not assignable to type 'import("D:/Projects/opensource/flowaccount-nx-plugins/libs/nx-serverless/node_modules/rxjs/internal/Observable").Observable<import("D:/Projects/opensource/flowaccount-nx-plugins/node_modules/@angular-devkit/architect/src/api").BuilderOutput>'.
      The types of 'source.operator.call' are incompatible between these types.
        Type '(subscriber: import("D:/Projects/opensource/flowaccount-nx-plugins/node_modules/rxjs/internal/Subscriber").Subscriber<any>, source: any) => import("D:/Projects/opensource/flowaccount-nx-plugins/node_modules/rxjs/internal/types").TeardownLogic' is not assignable to type '(subscriber: import("D:/Projects/opensource/flowaccount-nx-plugins/libs/nx-serverless/node_modules/rxjs/internal/Subscriber").Subscriber<any>, source: any) => import("D:/Projects/opensource/flowaccount-nx-plugins/libs/nx-serverless/node_modules/rxjs/internal/types").TeardownLogic'.
          Types of parameters 'subscriber' and 'subscriber' are incompatible.
            Type 'import("D:/Projects/opensource/flowaccount-nx-plugins/libs/nx-serverless/node_modules/rxjs/internal/Subscriber").Subscriber<any>' is not assignable to type 'import("D:/Projects/opensource/flowaccount-nx-plugins/node_modules/rxjs/internal/Subscriber").Subscriber<any>'.
              Property 'isStopped' is protected but type 'Subscriber<T>' is not a class derived from 'Subscriber<T>'.

21         filter(e => e.success !== undefined),
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libs/nx-serverless/src/utils/testing.ts:38:50 - error TS2345: Argument of type 'CoreSchemaRegistry' is not assignable to parameter of type 'SchemaRegistry'.
  The types of 'compile(...).source.operator.call' are incompatible between these types.
    Type '(subscriber: import("D:/Projects/opensource/flowaccount-nx-plugins/libs/nx-serverless/node_modules/rxjs/internal/Subscriber").Subscriber<any>, source: any) => import("D:/Projects/opensource/flowaccount-nx-plugins/libs/nx-serverless/node_modules/rxjs/internal/types").TeardownLogic' is not assignable to type '(subscriber: import("D:/Projects/opensource/flowaccount-nx-plugins/node_modules/rxjs/internal/Subscriber").Subscriber<any>, source: any) => import("D:/Projects/opensource/flowaccount-nx-plugins/node_modules/rxjs/internal/types").TeardownLogic'.
      Types of parameters 'subscriber' and 'subscriber' are incompatible.
        Type 'import("D:/Projects/opensource/flowaccount-nx-plugins/node_modules/rxjs/internal/Subscriber").Subscriber<any>' is not assignable to type 'import("D:/Projects/opensource/flowaccount-nx-plugins/libs/nx-serverless/node_modules/rxjs/internal/Subscriber").Subscriber<any>'.
          Property 'isStopped' is protected but type 'Subscriber<T>' is not a class derived from 'Subscriber<T>'.

38   const architect = new Architect(architectHost, registry);
                                                    ~~~~~~~~

libs/nx-serverless/src/utils/target.schedulers.ts:21:9 - error TS2345: Argument of type 'MonoTypeOperatorFunction<BuilderOutput>' is not assignable to parameter of type 'OperatorFunction<BuilderOutput, BuilderOutput>'.
  Types of parameters 'source' and 'source' are incompatible.
    Type 'import("D:/Projects/opensource/flowaccount-nx-plugins/node_modules/rxjs/internal/Observable").Observable<import("D:/Projects/opensource/flowaccount-nx-plugins/node_modules/@angular-devkit/architect/src/api").BuilderOutput>' is not assignable to type 'import("D:/Projects/opensource/flowaccount-nx-plugins/libs/nx-serverless/node_modules/rxjs/internal/Observable").Observable<import("D:/Projects/opensource/flowaccount-nx-plugins/node_modules/@angular-devkit/architect/src/api").BuilderOutput>'.
      The types of 'source.operator.call' are incompatible between these types.
        Type '(subscriber: import("D:/Projects/opensource/flowaccount-nx-plugins/node_modules/rxjs/internal/Subscriber").Subscriber<any>, source: any) => import("D:/Projects/opensource/flowaccount-nx-plugins/node_modules/rxjs/internal/types").TeardownLogic' is not assignable to type '(subscriber: import("D:/Projects/opensource/flowaccount-nx-plugins/libs/nx-serverless/node_modules/rxjs/internal/Subscriber").Subscriber<any>, source: any) => import("D:/Projects/opensource/flowaccount-nx-plugins/libs/nx-serverless/node_modules/rxjs/internal/types").TeardownLogic'.
          Types of parameters 'subscriber' and 'subscriber' are incompatible.
            Type 'import("D:/Projects/opensource/flowaccount-nx-plugins/libs/nx-serverless/node_modules/rxjs/internal/Subscriber").Subscriber<any>' is not assignable to type 'import("D:/Projects/opensource/flowaccount-nx-plugins/node_modules/rxjs/internal/Subscriber").Subscriber<any>'.
              Property 'isStopped' is protected but type 'Subscriber<T>' is not a class derived from 'Subscriber<T>'.

21         filter(e => e.success !== undefined),
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libs/nx-serverless/src/utils/testing.ts:38:50 - error TS2345: Argument of type 'CoreSchemaRegistry' is not assignable to parameter of type 'SchemaRegistry'.
  The types of 'compile(...).source.operator.call' are incompatible between these types.
    Type '(subscriber: import("D:/Projects/opensource/flowaccount-nx-plugins/libs/nx-serverless/node_modules/rxjs/internal/Subscriber").Subscriber<any>, source: any) => import("D:/Projects/opensource/flowaccount-nx-plugins/libs/nx-serverless/node_modules/rxjs/internal/types").TeardownLogic' is not assignable to type '(subscriber: import("D:/Projects/opensource/flowaccount-nx-plugins/node_modules/rxjs/internal/Subscriber").Subscriber<any>, source: any) => import("D:/Projects/opensource/flowaccount-nx-plugins/node_modules/rxjs/internal/types").TeardownLogic'.
      Types of parameters 'subscriber' and 'subscriber' are incompatible.
        Type 'import("D:/Projects/opensource/flowaccount-nx-plugins/node_modules/rxjs/internal/Subscriber").Subscriber<any>' is not assignable to type 'import("D:/Projects/opensource/flowaccount-nx-plugins/libs/nx-serverless/node_modules/rxjs/internal/Subscriber").Subscriber<any>'.
          Property 'isStopped' is protected but type 'Subscriber<T>' is not a class derived from 'Subscriber<T>'.

38   const architect = new Architect(architectHost, registry);
~

from nx-plugins.

wickstargazer avatar wickstargazer commented on May 24, 2024

any idea guys? i will take a hack at it again to try make it build

from nx-plugins.

wickstargazer avatar wickstargazer commented on May 24, 2024

guys i have moved the needle. Its building now but test is not passing, i am figuring out how to run schematic for jest.conf its not working the same way :) So it the tests passes and e2e passes then we are good to go!

pushed to the same branch

from nx-plugins.

wickstargazer avatar wickstargazer commented on May 24, 2024

Hi guys, linking the pr to this issue #80

Also published a preview version for the lib. 1.0.0-beta.1

from nx-plugins.

Related Issues (20)

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.