Skip to content

Commit 549df29

Browse files
author
Beatriz Rizental
authored
Merge pull request #92 from brizental/1694897-troubleshooting
Bug 1694897 - Provide troubleshooting documentation for known issues
2 parents 2ed006a + c216af4 commit 549df29

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Unreleased changes
22

33
[Full changelog](https://github.com/mozilla/glean.js/compare/v0.3.0...main)
4+
5+
* [#92](https://github.com/mozilla/glean.js/pull/92): Remove `web-ext-types` from `peerDependencies` list.
46
# v0.3.0 (2021-02-24)
57

68
[Full changelog](https://github.com/mozilla/glean.js/compare/v0.2.0...v0.3.0)

docs/troubleshooting.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Troubleshooting
2+
3+
## "Cannot find module '@mozilla/glean'"
4+
5+
Glean.js does not have a [`main`](https://nodejs.org/api/packages.html#packages_main_entry_point_export) package entry point. Instead it relies on a series of entry points depending on the platform you are targeting.
6+
7+
In order to import Glean use `import Glean from '@mozilla/glean/<your-platform>`.
8+
9+
> **Note**: Currently, the only supported platform is `webext`. Therefore the only valid import is `@mozilla/glean/webext`.
10+
11+
## "Module not found: Error: Can't resolve '@mozilla/glean/webext' in '...'"
12+
13+
Glean.js relies on Node.js' [subpath exports](https://nodejs.org/api/packages.html#packages_subpath_exports) feature to define multiple package entry points.
14+
15+
Please make sure that you are using a supported Node.js runtime (>= v12.7.0) and also make sure
16+
the tools you are using support this Node.js feature.
17+
18+
> **Note**: If using Webpack, make sure you have a version >= 5.0.0 (see v5.0.0 [release notes](https://webpack.js.org/blog/2020-10-10-webpack-5-release/#major-changes-new-nodejs-ecosystem-features) for details).

glean/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,5 @@
9797
},
9898
"dependencies": {
9999
"uuid": "^8.3.2"
100-
},
101-
"peerDependencies": {
102-
"web-ext-types": "^3.2.1"
103100
}
104101
}

0 commit comments

Comments
 (0)