You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting a bug report.
What version of OpenTelemetry are you using?
1.10
What version of Node are you using?
v14.18.3
Please provide the code you used to setup the OpenTelemetry SDK
import { registerInstrumentations } from '@opentelemetry/instrumentation';
import { DocumentLoadInstrumentation } from '@opentelemetry/instrumentation-document-load';
import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base';
import { WebTracerProvider } from '@opentelemetry/sdk-trace-web';
const provider = new WebTracerProvider();
provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));
registerInstrumentations({
instrumentations: [new DocumentLoadInstrumentation()],
});
What did you do?
Installed latest (1.1.0) version of otel deps
Added example setup snippet
Tried to build app (using Parcel)
What did you expect to see?
I expected my app to build
What did you see instead?
Error:
@parcel/resolver-default: Could not load './build/esm/index.js' from module
'@opentelemetry/sdk-trace-web' found in package.json#module
/Users/bogdan/Workspace/Grafana/grafana-javascript-agent/node_modules/@opentelemetry/sdk-trace-web/package.json:6:13
5 | "main": "build/src/index.js",
> 6 | "module": "build/esm/index.js",
> | ^^^^^^^^^^^^^^^^^^^^ './build/esm/index.js' does not exist, did you mean './build/src/index.js'?'
7 | "esnext": "build/esnext/index.js",
8 | "types": "build/src/index.d.ts",
It seems most @opentelemtry packages only have build/src, but are missing esm and esnext builds.
Additional context
Quick investigation found:
Each package has a tsconfig.all.json that would build all versions of the package
Root compile command uses ts --build
Root tsconfig.json has references to each package directory only, thus each package is built using it's default tsconfig.json which only builds the commonjs module. Therein lies the issue
Possible solutions:
modify root tsconfig.json references to point to tsconfig.all.json for each package
Modify root compile command to lerna run compile instead of ts --build
The text was updated successfully, but these errors were encountered:
Please answer these questions before submitting a bug report.
What version of OpenTelemetry are you using?
1.10
What version of Node are you using?
v14.18.3
Please provide the code you used to setup the OpenTelemetry SDK
What did you do?
What did you expect to see?
I expected my app to build
What did you see instead?
Error:
It seems most
@opentelemtry
packages only havebuild/src
, but are missingesm
andesnext
builds.Additional context
Quick investigation found:
tsconfig.all.json
that would build all versions of the packagecompile
command usests --build
tsconfig.json
has references to each package directory only, thus each package is built using it's defaulttsconfig.json
which only builds the commonjs module. Therein lies the issuePossible solutions:
tsconfig.json
references to point totsconfig.all.json
for each packagecompile
command tolerna run compile
instead ofts --build
The text was updated successfully, but these errors were encountered: