Build errors with intl-messageformat
See original GitHub issueWhen building my Svelte app, I’m getting these errors from svelte-i8n (and it’s dependencies.) One thing I noticed is that the intel-messageformat project is archived. Perhaps, it’s obsolete and needs to be replaced?
yarn run v1.21.1
warning package.json: No license field
$ rollup -c
src/main.js → public/bundle.js...
(!) `this` has been rewritten to `undefined`
https://rollupjs.org/guide/en/#error-this-is-undefined
node_modules/intl-messageformat/lib/core.js
4: See the accompanying LICENSE file for terms.
5: */
6: var __assign = (this && this.__assign) || function () {
^
7: __assign = Object.assign || function(t) {
8: for (var s, i = 1, n = arguments.length; i < n; i++) {
...and 1 other occurrence
node_modules/intl-messageformat/lib/formatters.js
1: var __extends = (this && this.__extends) || (function () {
^
2: var extendStatics = function (d, b) {
3: extendStatics = Object.setPrototypeOf ||
...and 3 other occurrences
node_modules/intl-format-cache/lib/index.js
4: See the accompanying LICENSE file for terms.
5: */
6: var __spreadArrays = (this && this.__spreadArrays) || function () {
^
7: for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
8: for (var r = Array(s), k = 0, i = 0; i < il; i++)
...and 1 other occurrence
...and 3 other files
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Intl MessageFormat | Format.JS
To create a message to format, use the IntlMessageFormat constructor. The constructor takes three parameters: message - {String | AST} - String message...
Read more >Top 5 intl-messageformat Code Examples - Snyk
To help you get started, we've selected a few intl-messageformat examples, based on popular ways it is used in public projects.
Read more >intl-messageformat - npm
Start using intl-messageformat in your project by running `npm i ... TypeScript icon, indicating that this package has built-in type ...
Read more >intl-messageformat-parser examples - CodeSandbox
Learn how to use intl-messageformat-parser by viewing and forking example apps that make use of intl-messageformat-parser on CodeSandbox.
Read more >message-format | Yarn - Package Manager
A poorly formatted pattern will cause an Error to be thrown. MessageFormat instances ... args is an object containing the values to replace...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This was a while ago, but the code goes into rollup.config.js. So declare the
onwarn
function, and use it inexport default
as needed.In my case it looked something like this:
@rlaferla Hey 👋 Please check the FAQ section of the wiki https://github.com/kaisermann/svelte-i18n/wiki/FAQ#this-keyword-is-equivalent-to-undefined 😁