nx doesn't do correct node resolution
See original GitHub issuehttps://github.com/angular/angular-cli/issues/3864
it’s like Deja Vu, this issue just recently resolved in angular cli, now nx suffer from the same.
when node_module is in upper folder (mainly because of docker) the nx or any cli which is invoked by npm, should be able to traverse the folders and find the node_modules and use that folder as the node_module.
Current Behavior
/home/app # npm start -- playground
> revaedge@0.0.0 start /home/app
> nx serve "playground"
> NX ERROR Could not find Nx in this workspace.
To convert an Angular workspace to Nx run: ng add @nrwl/workspace
Expected Behavior
work like any other correct nodejs app. resolve to upper folder
Steps to Reproduce
move node_module to upper folder and try to run npm start.
Failure Logs
Environment
can’t because nx doesn’t work as it should
/home/app # npx nx report
> NX ERROR Could not find Nx in this workspace.
To convert an Angular workspace to Nx run: ng add @nrwl/workspace
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Project Configuration - Nx
Projects can be configured in package.json (if you use npm scripts and not Nx executors) ... Nx merges the two files to get...
Read more >Module not found: Can't resolve 'fs' in Next.js application
I deleted node_modules and package-lock.json and then npm cache clean and npm install...but still the same error appears. – Ibad Shaikh. Nov 20, ......
Read more >Common errors - FAQ | NestJS - A progressive Node.js ...
Nest can't resolve dependencies of the <provider> (?). ... To fix that, make sure you're importing the class reference or use a custom...
Read more >tsconfig-paths
js runtime resolution strategy of modules. But it also allows the use of path mapping which allows arbitrary module paths (that doesn't start ......
Read more >nrwl-nx/community - Gitter
Hey again @kristofdegrave , it's saying Module not found: Error: Can't resolve '@namespace/lib-name-1' in '..../libs/lib-name-2/src/lib'.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@bekos let me try, I will update in here
@mhamri seems like it cannot locate the workspace directory, and probably related to https://github.com/nrwl/nx/issues/3484 which is more complicated. I will try to take a stub on this and let you know.