These relative modules were not found: ./tracers/test/testSpan and ./tracers/test/testTracer
See original GitHub issue- Package Name: @azure/service-bus
- Package Version: 7.0.2
- Operating system: Windows
- nodejs
- version: 14.15.4
- typescript
- version: 4.1.3
Describe the bug
ERROR Failed to compile with 2 errors 07:50:28
These relative modules were not found:
* ./tracers/test/testSpan in ./node_modules/@azure/core-tracing/dist-esm/src/index.js
* ./tracers/test/testTracer in ./node_modules/@azure/core-tracing/dist-esm/src/index.js
ERROR Build failed with errors.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
To Reproduce Steps to reproduce the behavior:
- Create a Vue 3 project
- Add Electron
- add
@azure/service-bus
- try to use
@azure/service-bus
from the background.ts (backend code of electron) - use yarn not npm
Reason is:
@azure/service-bus
uses @azure/tracing
This has the following index.js
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
export { getTracer, setTracer } from "./tracerProxy";
// Tracers and wrappers
export { NoOpSpan } from "./tracers/noop/noOpSpan";
export { NoOpTracer } from "./tracers/noop/noOpTracer";
export { OpenCensusSpanWrapper } from "./tracers/opencensus/openCensusSpanWrapper";
export { OpenCensusTracerWrapper } from "./tracers/opencensus/openCensusTracerWrapper";
export { TestTracer } from "./tracers/test/testTracer";
export { TestSpan } from "./tracers/test/testSpan";
// Utilities
export { extractSpanContextFromTraceParentHeader, getTraceParentHeader } from "./utils/traceParentHeader";
//# sourceMappingURL=index.js.map
And finally the tracers directory does not contain test
Expected behavior A module should not export something, that is not part of that module.
A build should not fail.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
These relative modules were not found: · Issue #439 - GitHub
when runing dev-server there throw these two Error ERROR Failed to compile with 2 errors 10:53:28 These relative modules were not found: ....
Read more >Vue.JS Error: This relative module was not found
I was making an update to a small Vue.JS side project when I encountered a build error: This relative module was not found...
Read more >This relative module was not found: npm run watch - Laracasts
I am having some problem in my code. When I do npm run watch it throws errors below: This relative module was not...
Read more >Error: This relative module was not found - Get Help - Vue Forum
I am trying to follow this tutorial by geekyants to implement a login screen for my app. The github repo for anyone interested...
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 FreeTop 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
Top GitHub Comments
Hi @MBurchard, okay I think I understand what happened here.
The problem here looks like it’s related to
yarn autoclean
, specifically driven by this file:https://github.com/MBurchard/azureProblemDemo20210127/blob/86f64e4e83033353c9d1442c9f477b8a4a777706/.yarnclean#L3
The line I’ve linked to above removes all
test
folders in node_modules, which also removes thetracers/test
folder, causing the build error. I’m not very familiar with using that file and I didn’t see an obvious way to say “test but not ‘tracers/test’” so it might be that the only solution is to remove that line altogether from your .yarnclean file.I’m closing this issue but please re-open if you want to discuss this further.
Thank you for the support. So far I have not had any problems with the yarn autoclean feature. I use it primarily to ensure that when modules are uninstalled, the dependencies that are no longer needed are also cleaned up. I have commented out the entire section for testing.
@xirzec It is to save disk space on the developer machine. Over time in all that projects the amount of files in all that node_modules folders increases dramatically. Even though I have an SSD that is big enough, I am a fan of something taking out the trash.