question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error creating express application

See original GitHub issue

Current Behavior

Error creating a express (v14.1.1) application, sends this: Cannot find module ‘nx/src/generators/utils/json’

Expected Behavior

Create a express application

Steps to Reproduce

yarn add @nrwl/express -W yarn nx g @nrwl/express:application api

Failure Logs

Cannot find module ‘nx/src/generators/utils/json’ Require stack:

  • /home/wmediape/angular/example/node_modules/@nrwl/express/node_modules/@nrwl/devkit/src/generators/format-files.js
  • /home/wmediape/angular/example/node_modules/@nrwl/express/node_modules/@nrwl/devkit/index.js
  • /home/wmediape/angular/example/node_modules/@nrwl/express/src/generators/application/application.js
  • /home/wmediape/angular/example/node_modules/nx/src/config/workspaces.js
  • /home/wmediape/angular/example/node_modules/nx/src/command-line/generate.js
  • /home/wmediape/angular/example/node_modules/nx/src/command-line/nx-commands.js
  • /home/wmediape/angular/example/node_modules/nx/bin/init-local.js
  • /home/wmediape/angular/exmple/node_modules/nx/bin/nx.js error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Environment

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:14 (2 by maintainers)

github_iconTop GitHub Comments

16reactions
AsimNetcommented, May 9, 2022

I just had this issue after upgrading to: 14.0.1 and it was solved after running these commands (upgrade Nx):

$: nx migrate latest
$: nx migrate --run-migrations

Reference: https://nx.dev/using-nx/updating-nx

0reactions
AgentEndercommented, May 26, 2022

Hey, it looks like this was a problem in previous versions that is now fixed. I’m going to go ahead and close this out. If the error is still occurring on the latest version for anyone, feel free to open a new issue or leave a comment asking for this one to be reopened.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error handling - Express.js
Error Handling refers to how Express catches and processes errors that occur both synchronously and asynchronously. Express comes with a default error handler ......
Read more >
Error creating Node.js Express App. Cannot find
The Old WebStorm show this problem to create version 4.15.0 express-app but it works properly for express version 4.14.1 and less. Share.
Read more >
Error Handling in Express - Reflectoring
The simplest way of handling errors in Express applications is by putting the error handling logic in the individual route handler functions. We ......
Read more >
A Guide to Error Handling in Express.js | Scout APM Blog
Step 4: Creating and Handling Custom Errors. It is pretty helpful to create custom error classes for your applications by extending Node's Error...
Read more >
Express.js Error Handling 101 - ButterCMS
In this article, we will build a simple Express application that fetches, updates, and creates posts using the ButterCMS Write API and library....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found