Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] create command fails with error "Cannot find module '@nrwl/workspace/src/utils/fileutils'" #154

Closed
jcassee opened this issue Dec 7, 2022 · 10 comments

Comments

@jcassee
Copy link

jcassee commented Dec 7, 2022

Plugin Name

@nxrocks/nx-flutter

Plugin Version

v5.1.0

Nx Version

15.3.0

Expected Behaviour

I tried to create a flutter application using the create command:

npx nx g @nxrocks/nx-flutter:create flutter-test

I had expected it to create a flutter application.

Actual Behaviour

>  NX  Generating @nxrocks/nx-flutter:project

✔ What package name would you like to use? · com.example
✔ What is the project about? · Example
✔ Which type of Flutter project would you like to create? · app

 >  NX   Cannot find module '@nrwl/workspace/src/utils/fileutils'

   Require stack:
   - PROJECT_PATH/node_modules/@nxrocks/common/src/lib/core/jvm/utils.js
   - PROJECT_PATH/node_modules/@nxrocks/common/src/lib/core/jvm/index.js
   - PROJECT_PATH/node_modules/@nxrocks/common/src/index.js
   - PROJECT_PATH/node_modules/@nxrocks/nx-flutter/src/generators/project/generator.js
   - PROJECT_PATH/node_modules/nx/src/config/workspaces.js
   - PROJECT_PATH/node_modules/nx/src/config/configuration.js
   - PROJECT_PATH/node_modules/nx/src/command-line/generate.js
   - PROJECT_PATH/node_modules/nx/src/command-line/nx-commands.js
   - PROJECT_PATH/node_modules/nx/bin/init-local.js
   - PROJECT_PATH/node_modules/nx/bin/nx.js
   Pass --verbose to see the stacktrace.

Steps to reproduce the behaviour

  1. Create an nx project.
  2. Install nx-flutter
  3. Run create command
@jcassee
Copy link
Author

jcassee commented Dec 7, 2022

I checked old bug reports. #37 looks similar, but is closed as fixed.

@tinesoft
Copy link
Owner

Hi @jcassee

Sorry for the delay in responding... I totally missed this issue.
Are you still having the problem ? I cannot reproduce it...

@tinesoft
Copy link
Owner

Closing for now, Feel free to re-open, if issue is still relevant

@jcassee
Copy link
Author

jcassee commented Mar 24, 2023

Sorry for the long silence, but just to confirm: I have not had this problem since upgrading to Nx 15.7+.

@trondeh80
Copy link

I got the same problem today. Having this in my workspace (running in WSL 2):
Node : 21.0.0
OS : linux-x64
npm : 10.2.0

nx (global) : 17.0.1
nx : 17.0.1
@nx/js : 17.0.1
@nx/jest : 17.0.1
@nx/linter : 17.0.1
@nx/eslint : 17.0.1
@nx/workspace : 17.0.1
@nx/devkit : 17.0.1
@nx/eslint-plugin : 17.0.1
@nx/next : 17.0.1
@nx/playwright : 17.0.1
@nx/react : 17.0.1
@nrwl/tao : 17.0.1
@nx/web : 17.0.1
typescript : 5.1.6

Community plugins:
@nxrocks/nx-spring-boot : 8.1.0

When I try to generate the spring boot application. It fails with the error message:

NX Cannot find module '@nx/workspace/src/utils/fileutils'

@tinesoft
Copy link
Owner

Hi @trondeh80

Thank you for using my nx-spring-boot plugin.
It looks like you are using the latest version to date of Nx (v17.x.x), and apparently the mentioned utility was (re)moved since.

I have create #195 to update all my plugins including the nx-spring-boot plugin for full compatibility with Nx 17.

Please stay tuned!

@trondeh80
Copy link

Great! I got it working by manually editing the import path in your js files in my node_modules folder. Thank you so much for creating such an awesome tool! :)

@tinesoft
Copy link
Owner

Thanks for the kind words @trondeh80 :-)

I'm glad it's useful to you!
Don't hesitate to show your support by giving a ⭐ to the project on Github ;-)

@tinesoft
Copy link
Owner

@trondeh80 Fixed and released in https://github.com/tinesoft/nxrocks/releases/tag/nx-spring-boot%2Fv9.0.0

@trondeh80
Copy link

Brilliant! Huge thanks! I starred your repo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants