Closed bhaskarmurthy closed 1 year ago
that's odd, and hasn't shown up in any e2e tests - maybe a 15.7.0 change 🤔 thanks for reporting I'll look into it
@bhaskarmurthy - please could you let me know if nx
is in your package.json
as a dependency
or a devDependencies
? I suspect the former.
I will make that code more robust regardless.
good q - i'm using npx nx
, and don't have nx
in my package.json
or installed globally
thats quite unusual. scaffolding a basic Nx workspace with npx create-nx-workspace
at a minimum generates a package.json
with nx
in devDependencies
🤔
{
"name": "simontest",
"version": "0.0.0",
"license": "MIT",
"scripts": {},
"private": true,
"dependencies": {},
"devDependencies": {
"@nrwl/js": "15.3.0",
"@nrwl/workspace": "15.3.0",
"nx": "15.3.0",
"prettier": "^2.6.2",
"typescript": "~4.8.2"
}
}
Very strange.
My list of deps is definitely missing nx
:
{
"name": "my-workspace",
"version": "0.0.0",
"license": "MIT",
"scripts": {},
"private": true,
"devDependencies": {
"@nrwl/cli": "15.7.0",
"@nrwl/devkit": "15.7.0",
"@nrwl/eslint-plugin-nx": "15.7.0",
"@nrwl/jest": "15.7.0",
"@nrwl/js": "15.7.0",
"@nrwl/linter": "15.7.0",
"@nrwl/node": "15.7.0",
"@nrwl/tao": "15.7.0",
"@nrwl/workspace": "15.7.0",
"@types/jest": "28.1.1",
"@types/node": "16.11.7",
"@typescript-eslint/eslint-plugin": "^5.36.1",
"@typescript-eslint/parser": "^5.36.1",
"eslint": "~8.15.0",
"eslint-config-prettier": "8.1.0",
"jest": "28.1.1",
"jest-environment-jsdom": "28.1.1",
"prettier": "2.8.4",
"ts-jest": "28.0.5",
"ts-node": "10.9.1",
"typescript": "4.8.4"
},
"dependencies": {
"tslib": "^2.3.0"
}
}
Just ran the init command in a new workspace, this is the output:
I used the
ts [an empty workspace with the JS/TS plugin preinstalled]
choice
{
"name": "workspace",
"version": "0.0.0",
"license": "MIT",
"scripts": {},
"private": true,
"dependencies": {},
"devDependencies": {
"@nrwl/cli": "13.7.3",
"@nrwl/js": "13.7.3",
"@nrwl/tao": "13.7.3",
"@nrwl/workspace": "13.7.3",
"@types/node": "16.11.7",
"prettier": "^2.5.1",
"typescript": "~4.5.2"
}
}
Okay - so looks like my npx
is bringing in nx 13.x
-> while the latest is 15.x
, and has a different structure that looks like the one you shared.
I ended up re-creating my workspace with nx@latest
and now have the nx
dependency.
Thanks for the quick response and assistance @simondotm!
Ok yeah, nx is the new CLI package as of 13.9.7. The plugin is built against 13.10.6 minimum so that would explain it.
will this work with nx 15? or is there a roadmap to support this?
will this work with nx 15? or is there a roadmap to support this?
Yes as far as I know the plugin is compatible with v15.x
I think I'm getting an error because I now don't have an angular.json file. But I will try again. I'm setting up for the first time.
I'm trying to add
nx-firebase
to a freshly creatednx
workspace.For some reason looks like
workspaceNxVersion
isundefined
in the init generator:My
nx
config is: