Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Unreleased changes

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

* [#92](https://github.com/mozilla/glean.js/pull/92): Remove `web-ext-types` from `peerDependencies` list.
# v0.3.0 (2021-02-24)

[Full changelog](https://github.com/mozilla/glean.js/compare/v0.2.0...v0.3.0)
Expand Down
18 changes: 18 additions & 0 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Troubleshooting

## "Cannot find module '@mozilla/glean'"

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.

In order to import Glean use `import Glean from '@mozilla/glean/<your-platform>`.

> **Note**: Currently, the only supported platform is `webext`. Therefore the only valid import is `@mozilla/glean/webext`.

## "Module not found: Error: Can't resolve '@mozilla/glean/webext' in '...'"

Glean.js relies on Node.js' [subpath exports](https://nodejs.org/api/packages.html#packages_subpath_exports) feature to define multiple package entry points.

Please make sure that you are using a supported Node.js runtime (>= v12.7.0) and also make sure
the tools you are using support this Node.js feature.

> **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).
3 changes: 0 additions & 3 deletions glean/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,5 @@
},
"dependencies": {
"uuid": "^8.3.2"
},
"peerDependencies": {
"web-ext-types": "^3.2.1"
}
}