Closed jmeinlschmidt closed 1 year ago
You should be able to run nx graph
and click on the edge between the two projects to identify the file that is being identified as a link, can you try troubleshooting there?
If there is something that is picked up which shouldn't be, you can add a // nx-ignore-next-line
comment as a workaround until its fixed.
@AgentEnder thank you for the answer!
I have started receiving dependency on karma.conf.js
. Even though I can't see any dependency on application-1 in the code.
// lib-a
// karma.conf.js
const { join } = require('path');
const getBaseKarmaConfig = require('../../../karma.conf');
module.exports = function (config) {
const baseConfig = getBaseKarmaConfig();
config.set({
...baseConfig,
coverageReporter: {
...baseConfig.coverageReporter,
dir: join(__dirname, '../../../coverage/libs/a'),
},
});
};
Just to clarify, I didn't change this code above or upgraded Karma together with the Nx upgrade. Speaking of nx.json
, following lines were modified by the migration to higher version of Nx.
Maybe I'm missing something but I'm still convinced that this isn't an issue caused by Karma. Thank you for the help!
I've got the same problem after upgrading, not using karma though.
Maybe its the const getBaseKarmaConfig = require('../../../karma.conf');
for me its a similar setup with webpack. I have webcack config files in each app and lib which all require/import from common base config in a shared library. the first analyzed app then has this loop in the graph.
Edit:
adding // nx-ignore-next-line
to all files which require the global shared config seems to do the trick
fixed by using // nx-ignore-next-line
for the problematic lines. thank you for the help @jaypea !
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
Current Behavior
We've got an angular v15 project with follow structure:
application-1
depends on both libs,lib-a
depends onlib-b
.Until now, everything was working fine. After upgrading nx (and all
@nrwl
packages) from version15.2.4
to15.3.0
, I'm receiving following error on runningnx build
(no matter the--configuration
):This error doesn't get raised on
nx serve
. I've reproduced this same behaviour on all minor versions since15.3.0
, including the latest --15.5.2
. Before reproducing this error while switching versions, I had removednode_modules
andpackage-lock.json
.Since
lib-a
is very small (10 classes), I have manually checked dependencies (import statements) in all .ts files inlib-a
and made sure there are no dependencies onapplication-1
. Thus there can't be any circular dependency and I'm considering this error as falsely positive.Any ideas or suggestions?
Expected Behavior
Running
nx build
doesn't raise false positive circular dependency error.Github Repo
No response
Steps to Reproduce
/
Nx Report
Failure Logs
No response
Additional Information
No response