Problem testing simple package in repo
See original GitHub issueIβm trying to follow the guide:
Nx and Yarn/Lerna (Workspaces for Publishing NPM Packages)
Current Behavior
I was able to create the simple project and install the projects dependencies but when I try to run:
npx nx test simple
I get:
Usage Error: The project in /mnt/wsl/projects/git/www/my-payload/package.json doesn't seem to have been installed - running an install there might help
$ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] <scriptName> ...
βββββββββββββββββββββββββββββββββββββββββββββββ
> NX ERROR Running target "simple:test" failed
Failed tasks:
- simple:test
Hint: run the command with --verbose for more details.
If I cd into the packages/simple directory and run:
node
index.js`
The test runs normally and displays:
Hello World
Expected Behavior
Running the above nx command should run node and display the expected output
Steps to Reproduce
Not sure AFAIK Iβm Just following the setup in the guide, any suggestions on how I can debug what Iβve done wrong would be appreciated.
I have a public repo of my code here:
https://github.com/mwoodpatrick/my-payload
Failure Logs
No logs generated
Environment
The only special item of notice is that Iβm running on WSL-2 but I have other nx projects running in same environment without issue.
NX Report complete - copy this into the issue template
Node : 16.13.1 OS : linux x65 yarn : 3.1.1
nx : 13.3.9 @nrwl/angular : undefined @nrwl/cli : 13.3.9 @nrwl/cypress : undefined @nrwl/devkit : 13.3.9 @nrwl/eslint-plugin-nx : undefined @nrwl/express : undefined @nrwl/jest : 13.3.9 @nrwl/linter : 13.3.9 @nrwl/nest : undefined @nrwl/next : undefined @nrwl/node : undefined @nrwl/nx-cloud : undefined @nrwl/react : undefined @nrwl/react-native : undefined @nrwl/schematics : undefined @nrwl/tao : 13.3.9 @nrwl/web : undefined @nrwl/workspace : 13.3.9 @nrwl/storybook : undefined @nrwl/gatsby : undefined typescript : 4.4.4 rxjs : 6.6.7
Community plugins:
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
This seems to be a yarn version issue with having yarn 3 set in my env even though I have a yarnrc.yml with:
It would be great if nx supported yarn3
Doing:
Puts the node app my-node-app under packages rather than apps which is what I had expected!