`TypeError` due to `URL(window.location.href)` after upgrading to node-forge 1.3.1
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
- #1153 @cpruijsen による — マージされずにクローズ
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- javascript
- 領域
- mobile-dev, security
調査の方向性
Start at the failing code location in dist/index.js around line 2126 and trace which node-forge 1.3.1 path constructs new URL(window.location.href). Check how that path is reached in a Tabris.js runtime and identify the environment-support condition described in the issue. Done means the application loads without this TypeError while browser behavior remains supported; no test file is named in the issue.
索引モデルが issue の本文から書いたものです。
説明
Environment:
Project type: Tabris.js (hybrid mobile framework using JavaScript)
Node version: 22.15.0
node-forge version: upgrading from 0.7.6 to 1.3.1
Problem:
After upgrading node-forge from version 0.7.6 to 1.3.1, the application fails to load and throws the following runtime error:
Could not load main module: TypeError: undefined is not a constructor (evaluating 'new URL(window.location.href)')
at js (./dist/index.js:2126:5)
at __webpack_require__ (./dist/index.js:6992:46)
This happens because window.location.href is not available in the Tabris.js runtime. These are browser-specific APIs and do not exist in Tabris.js or other hybrid environments.
The older version 0.7.6 works fine.
Expected Behavior:
The library should check if the environment supports these before using them. Please consider making the library more compatible with hybrid runtimes like Tabris.js.
- 主要言語
- JavaScript
- スター
- 5.4k
- フォーク
- 875
- 平均マージ
- 3分
- マージ済み PR(30日)
- 6
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
digitalbazaar/forge のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
digitalbazaar/forge#1170 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
digitalbazaar/forge#1147 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
digitalbazaar/forge#1146 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 58/100
digitalbazaar/forge#1145 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
digitalbazaar/forge#1144 ·
メンテナーはふだん 1 日以内に返信
digitalbazaar/forge の issue をすべて見る
似ている issue
-
🧩 Docs job fails type-checking `generate-plugin-docs.ts`対応中かも @X-Guardian が今日担当しました。 オープンdiscussion
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
msys2/setup-msys2#673 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
inveniosoftware/invenio-app-rdm#3630 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
githubnext/gh-aw-workshop#5522 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Dayset/ps2-elite-kd#119 ·