Hello everyone I m ha…
Hello everyone – I’m having a few issues. I just migrated from 9.0.4 to 9.2.4.
-
When I run
nx run <app>:build
it does not seem to be using the cache from the previous run? version: 9.2.4 -
Also,
nx run-many --target=build --projects=app1,app2
I receive the following error: “Error: Invalid projects: app1 app2” -
It produces the following error when a single app is listed:
internal/modules/cjs/loader.js:960 throw err; ^ at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15) at Function.Module._load (internal/modules/cjs/loader.js:840:27) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12) at internal/main/run_main_module.js:18:47 { code: 'MODULE_NOT_FOUND', requireStack: [] }
Responses:
I figured out #3 – the CLI was out of sync with the workspace version – it was on 8.7.0!!
Still need assistance with 1 and 2 though!
Fixed #1 –
I ran the migration command initially: nx migration --run-migrations=migrations.json
and it completed successfully, but for some reason it didn’t modify the nx.json and add the taskRunnerOptions section. Re-running the migration seems to have fixed that.
Issue # 2 still remains :slightly_smiling_face:
Not sure if it matters, but my project name has a dash in it ‘eis-api’
Do you have a repo somewhere to take a look at?
And I’m a bit confused. Are you trying to run app1
or eis-api
?
sorry, I mentioned app1,app2 in the initial message – I’m running eis-api - I was trying to simplify the example :slightly_smiling_face:
The code is in a private repo – I’ll see if I can create a reproducible repo.
– here is the repo: https://github.com/michael-golden/nx-run-man-error
running nx run-many –target=build –projects=nodashesapp1,nodashesapp2
Fails with: ```→ C:\Repos\examples\run-many-error [master ≡]› nx run-many –target=build –projects=nodashesapp1,nodashesapp2 C:\Repos\examples\run-many-error\node_modules\yargs\yargs.js:1109 else throw err ^
Error: Invalid projects: nodashesapp1 nodashesapp2 at checkForInvalidProjects (C:\Repos\examples\run-many-error\node_modules\@nrwl\workspace\src\command-line\run-many.js:39:15) at projectsToRun (C:\Repos\examples\run-many-error\node_modules\@nrwl\workspace\src\command-line\run-many.js:28:9) at Object.runMany (C:\Repos\examples\run-many-error\node_modules\@nrwl\workspace\src\command-line\run-many.js:13:22) at Object.handler (C:\Repos\examples\run-many-error\node_modules\@nrwl\workspace\src\command-line\nx-commands.js:38:141) at Object.runCommand (C:\Repos\examples\run-many-error\node_modules\yargs\lib\command.js:235:44) at Object.parseArgs [as _parseArgs] (C:\Repos\examples\run-many-error\node_modules\yargs\yargs.js:1022:30) at Object.get [as argv] (C:\Repos\examples\run-many-error\node_modules\yargs\yargs.js:965:21) at Object.initLocal (C:\Repos\examples\run-many-error\node_modules\@nrwl\cli\lib\init-local.js:20:79) at Object.<anonymous> (C:\Repos\examples\run-many-error\node_modules\@nrwl\cli\bin\nx.js:12:18) at Module._compile (internal/modules/cjs/loader.js:1133:30)```
One thing I just noticed: if I use npm run nx run-many
it works, but running nx run-many it fails with the aforementioned error.
Could this be an issue with the global cli ?
Yea
What’s your global cli version?
How do I tell that? nx –version complains when I’m not in a workspace
+– @nestjs/cli@6.10.5 +– @nrwl/cli@9.2.4
used: npm ls –depth=0 –global
Hmm
C:\Users\Gamer\AppData\Roaming\npm
+– @nrwl/cli@9.2.4
-- @nrwl/schematics@8.12.11
– @nrwl/workspace@8.12.11
`– @nrwl/cli@8.12.11
look like workspace/schematics are behind?
Yea they should all be the same version
Maybe it’s a global install thing that we missed
Let me try upgrading those – i’ll report back