ReferenceError: siblingVersion is not defined while installing the package
Opened this issue · 7 comments
Environment
node 20.9.0
yarn 1.22.17
vue 3.5.12
vite 5.4.10
Steps to Reproduce
- yarn add @sentry/capacitor @sentry/vue --exact
- error occured
Expected Result
package is installed
Actual Result
error /Users/iyong-eun/Desktop/works/ddtalk/codes/docktalk/node_modules/@sentry/capacitor: Command failed.
Exit code: 1
Command: node scripts/check-siblings.js
Arguments:
Directory: /Users/iyong-eun/Desktop/works/ddtalk/codes/docktalk/node_modules/@sentry/capacitor
Output:
/Users/iyong-eun/Desktop/works/ddtalk/codes/docktalk/node_modules/@sentry/capacitor/scripts/check-siblings.js:69
errorMessages.push("You must specify the version to the package " + installedVersion + ". ( " + installedVersion + "@" + siblingVersion + ")");
^
ReferenceError: siblingVersion is not defined
at ValidateSentryPackageParameters (/Users/iyong-eun/Desktop/works/ddtalk/codes/docktalk/node_modules/@sentry/capacitor/scripts/check-siblings.js:69:130)
at CheckSiblings (/Users/iyong-eun/Desktop/works/ddtalk/codes/docktalk/node_modules/@sentry/capacitor/scripts/check-siblings.js:128:7)
at Object. (/Users/iyong-eun/Desktop/works/ddtalk/codes/docktalk/node_modules/@sentry/capacitor/scripts/check-siblings.js:158:1)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
at node:internal/main/run_main_module:23:47
I think the function ValidateSentryPackageParameters
should be defined in the function CheckSiblings
or the variable siblingVersion
should be passed as an argument.
Hi, could you try installing with this specific version?
yarn add @sentry/capacitor @sentry/vue@8.33.0 --exact
Hi, could you try installing with this specific version?
yarn add @sentry/capacitor @sentry/vue@8.33.0 --exact
The same issue is occured with the command.
The only way to avoid this error seems to be installing the @sentry/capacitor and @sentry/vue packages separately, one at a time. When I try to install both simultaneously, the error occurs regardless of the versions.
I am sorry for your experience with the SDK.
We will investigate what could be happening with it.
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog
or Status: In Progress
, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀
Same here;
F:\app-mobile>yarn add @sentry/capacitor @sentry/react --exact
yarn add v1.22.21
[1/4] Resolving packages...
â ‚ react@latest(node:17980) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > @maplibre/maplibre-gl-leaflet@0.0.22" has unmet peer dependency "@types/leaflet@^1.9.0".
warning " > @mui/x-date-pickers@7.23.1" has unmet peer dependency "@mui/system@^5.15.14 || ^6.0.0".
[4/4] Building fresh packages...
[1/3] â ‚ msgpackr-extract
[2/3] â ‚ esbuild
error F:\app-mobile\node_modules\@sentry\capacitor: Command failed.
Exit code: 1
Command: node scripts/check-siblings.js
Arguments:
Directory: F:\app-mobile\node_modules\@sentry\capacitor
Output:
F:\app-mobile\node_modules\@sentry\capacitor\scripts\check-siblings.js:69
errorMessages.push("You must specify the version to the package " + installedVersion + ". ( " + installedVersion + "@" + siblingVersion + ")");
^
ReferenceError: siblingVersion is not defined
at ValidateSentryPackageParameters (F:\app-mobile\node_modules\@sentry\capacitor\scripts\check-siblings.js:69:130)
at CheckSiblings (F:\app-mobile\node_modules\@sentry\capacitor\scripts\check-siblings.js:128:7)
at Object.<anonymous> (F:\app-mobile\node_modules\@sentry\capacitor\scripts\check-siblings.js:158:1)
at Module._compile (node:internal/modules/cjs/loader:1566:14)
at Object..js (node:internal/modules/cjs/loader:1718:10)
at Module.load (node:internal/modules/cjs/loader:1305:32)
at Function._load (node:internal/modules/cjs/loader:1119:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:220:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:151:5)
Tried with updated yarn;
F:\app-mobile>yarn add @sentry/capacitor @sentry/react --exact
➤ YN0000: · Yarn 4.5.3
➤ YN0000: ┌ Resolution step
➤ YN0085: │ + @sentry/capacitor@npm:1.0.2, @sentry/react@npm:8.47.0, and 14 more.
➤ YN0000: └ Completed in 1s 804ms
➤ YN0000: ┌ Post-resolution validation
➤ YN0060: │ @sentry/react is listed by your project with version 8.47.0 (p9778c), which doesn't satisfy what @sentry/capacitor requests (8.37.1).
➤ YN0060: │ react is listed by your project with version 19.0.0 (p9a1eb), which doesn't satisfy what @reduxjs/toolkit and other dependencies request (but they have non-overlapping ranges!).
➤ YN0060: │ react-dom is listed by your project with version 19.0.0 (p00129), which doesn't satisfy what
motion and other dependencies request (^18.0.0).
➤ YN0002: │ ng-mobile@workspace:. doesn't provide @mui/system (pdc13f), requested by @mui/x-date-pickers.
➤ YN0002: │ ng-mobile@workspace:. doesn't provide @types/leaflet (pa44f3), requested by @maplibre/maplibre-gl-leaflet and other dependencies.
➤ YN0086: │ Some peer dependencies are incorrectly met by your project; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code.
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0013: │ 16 packages were added to the project (+ 21.17 MiB).
➤ YN0000: └ Completed in 1s 157ms
➤ YN0000: ┌ Link step
➤ YN0007: │ @sentry/capacitor@npm:1.0.2 [5ba1f] must be built because it never has been before or the last one failed
➤ YN0009: │ @sentry/capacitor@npm:1.0.2 [5ba1f] couldn't be built successfully (exit code 1, logs can be found here: C:\Users\duoquote\AppData\Local\Temp\xfs-84d02311\build.log)
➤ YN0000: └ Completed in 1s 25ms
➤ YN0000: · Failed with errors in 4s 34ms
# This file contains the result of Yarn building a package (@sentry/capacitor@virtual:5ba1f4ad53ff79878b10372d4329a1f7ff5fc72c5a123ab60857e910bd331c68b05ea08401c579aad5251bf131bdb95fd45f102d5e6f9a5f41edb95a36d19a35#npm:1.0.2)
# Script name: postinstall
F:\app-mobile\node_modules\@sentry\capacitor\scripts\check-siblings.js:153
throw IncompatibilityError.join("\n");
^
This version of Sentry Capacitor is incompatible with the following installed packages:
@sentry/react version 8.47.0
Please install the mentioned packages exactly with version 8.37.1 and with the argument --update-sentry-capacitor
npm install --save-exact @sentry/react@8.37.1 --update-sentry-capacitor
(Use `node --trace-uncaught ...` to show where the exception was thrown)
Node.js v23.4.0