Cammisuli / monodon

39 stars 17 forks source link

Error when attempting library generation #12

Closed KaanMol closed 1 year ago

KaanMol commented 1 year ago

Hi Cammisuli,

I want to thank you first of all for this project, it is exactly what I was searching for and the only thing I was missing in NX!

Description

When generating a new library or binary with the example command: nx generate @monodon/rust:library my-rust-node-lib --napi or the VSCode generation UI in the NX plugin the same error is returned.

Device

Macbook Pro 2021 - M1 Pro MacOS Ventura 13.0

Error

(0 , project_configuration_1.shouldDefaultToUsingStandaloneConfigs) is not a function

TypeError: (0 , project_configuration_1.shouldDefaultToUsingStandaloneConfigs) is not a function
    at getWorkspaceLayout (/Users/USER/Documents/PROJECT/node_modules/@monodon/rust/node_modules/@nrwl/devkit/src/utils/get-workspace-layout.js:25:96)
    at normalizeOptions (/Users/USER/Documents/PROJECT/node_modules/@monodon/rust/src/generators/init/generator.js:7:66)
    at init (/Users/USER/Documents/PROJECT/node_modules/@monodon/rust/src/generators/init/generator.js:33:31)
    at libraryGenerator (/Users/USER/Documents/PROJECT/node_modules/@monodon/rust/src/generators/library/generator.js:22:35)
    at Object.<anonymous> (/Users/USER/Documents/PROJECT/node_modules/nx/src/command-line/generate.js:250:36)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/USER/Documents/PROJECT/node_modules/tslib/tslib.js:164:62)

Of course if you need any more info, I am glad to help!

Cammisuli commented 1 year ago

What version of nx are you using?

KaanMol commented 1 year ago

NX version 15.7.1, Node.JS 18.12.1 and exists also on Node.JS 19.3

Cammisuli commented 1 year ago

Ah ok. I know what's up. Thank you!

lechuga01 commented 1 year ago

NX version 15.7.1, Node.JS 18.12.1 and exists also on Node.JS 19.3

if you need it urgently, you can update the module in node_modules\@monodon\rust\package.json "@nrwl/devkit": "15.3.0" to "@nrwl/devkit": "15.7.2"

that work to me

{ "name": "@monodon/rust", "version": "1.0.0", "main": "src/index.js", "repository": { "url": "https://github.com/cammisuli/monodon", "type": "git" }, "license": "MIT", "private": false, "generators": "./generators.json",
"executors": "./executors.json",
"dependencies": { "@nrwl/devkit": "15.7.2", <---- "@ltd/j-toml": "1.24.0", "chalk": "4.1.2" }, "types": "./src/index.d.ts", "peerDependencies": {}

Cammisuli commented 1 year ago

Yea, package managers have a way to override packages dependencies. So you can give that a shot.

I'm waiting for Nx 15.8.0 to come out before releasing a new version for this package.