question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Attempted import error: 'en' is not exported from 'make-plural/plurals'.

See original GitHub issue

Summary

I’ve opened ticket as we discussed.

I’m Using webpack 4 and all the latest remirror packages:

"remirror": "^1.0.0-next.32",
"@remirror/pm": "^1.0.0-next.32",
"@remirror/i18n": "^1.0.0-next.32",

And I’m getting this error on build:

Attempted import error: 'en' is not exported from 'make-plural/plurals'.

My @ ./src/shared/remirrorProvider.js file looks exactly like one of your basic examples

import React from 'react';
import { SocialEmojiComponent, SocialProvider } from 'remirror/react/social';

export const Remirror = () => {
  return (
    <SocialProvider>
      <SocialEmojiComponent />
    </SocialProvider>
  );
};

Expected results

Build pass.

Actual results

Creating an optimized production build...
(node:56701) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
^[Failed to compile.

./node_modules/@remirror/i18n/dist/i18n.browser.esm.js
Attempted import error: 'en' is not exported from 'make-plural/plurals'.
 @ ./node_modules/@remirror/react/dist/react.browser.esm.js
 @ ./node_modules/remirror/react/dist/remirror.browser.esm.js
 @ ./src/shared/remirrorProvider.js

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
anothericommented, Sep 5, 2020

Finally! I found it! I use file-loader which had .js files excluded but had no .mjs excluded, so when it imported make-plural it went through wrong loader. Right config looks like this now:

{
            loader: require.resolve('file-loader'),
            // Exclude `js` files to keep "css" loader working as it injects
            // it's runtime that would otherwise processed through "file" loader.
            // Also exclude `html` and `json` extensions so they get processed
            // by webpacks internal loaders.
            exclude: [/\.js$/, /\.mjs$/, /\.html$/, /\.json$/], // <--------- added  /\.mjs$/ here
            options: {
              name: 'static/media/[name].[hash:8].[ext]'
            }
          }

Thanks for all the support, and sorry for bothering not related to your module. 🙏

0reactions
anothericommented, Jul 1, 2021

@ivanbanov well, as far as I remember that was related to the lib that used .mjs file format instead of .js (for ES Module, I guess) which broke the webpack build b/c of configuration didn’t support such file format.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Attempted import error:' is not exported from - Stack Overflow
I had the same error, but used export default and it worked! declare class lama { // code here .. export default lama...
Read more >
How to Fix Attempted Import Error Switch is Not Exported From ...
Command:- npm install react-router-dom@5.3.0In This Video We Will See How to Fix Attempted Import Error Switch is Not Exported From ...
Read more >
Attempted import error: does not contain a default export
Blog : Referencehttps://progvocab.blogspot.com/2020/01/ attempted - import - error -does- not -contain.html.
Read more >
Errors | Remirror
This page contains the documented errors that occur while using remirror. ... Attempted import error: 'en' is not exported from 'make-plural/plurals'.
Read more >
Attempted import error 'X' is not exported from | bobbyhadz
The React.js "Attempted import error 'X' is not exported from" occurs when we try to import a named import that is not present...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found