downshift version: >= 3.1.3node version: 10npm (or yarn) version: latestRelevant code or config
commonjs({
include: 'node_modules/**',
namedExports: {
'react-is': ['isForwardRef', 'isValidElementType'],
},
}),
What you did:
Upgrade downshift from version 3.1.2
What happened:
[!] Error: 'isForwardRef' is not exported by node_modules/downshift/node_modules/react-is/index.js
https://rollupjs.org/guide/en#error-name-is-not-exported-by-module-
node_modules/downshift/dist/downshift.esm.js (8:9)
6: import React, { Component } from 'react';
7: import PropTypes from 'prop-types';
8: import { isForwardRef } from 'react-is';
^
9:
10: // istanbul ignore next
Error: 'isForwardRef' is not exported by node_modules/downshift/node_modules/react-is/index.js
Problem description:
After upgrading from downshit 3.1.2 my rollup build throws the error above. I had a configuration for react-is used by my package itself and other dependencies. I also have react-is as a dependency.
I have no idea why that's happening. Based on https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module it looks like you're configuring things correctly... :-/
I'll try to investigate and double check if did everything correctly.
I did a fresh install of everything a 3rd time and everything work.
Closing this issue since I was not able to reproduce it again.
If anyone else comes to this issue and needs a bit more help on this, you may need to update the key used in the namedExports config object in your Rollup config.
commonjs({
include: 'node_modules/**',
namedExports: {
'react-is': ['isForwardRef', 'isValidElementType'],
},
}),
or
commonjs({
include: 'node_modules/**',
namedExports: {
'node_modules/react-is/index.js': ['isForwardRef', 'isValidElementType'],
},
}),
As always, your mileage may vary.
The above solution doesn't work for me
the above solution doesn't work for me neither
Most helpful comment
If anyone else comes to this issue and needs a bit more help on this, you may need to update the key used in the namedExports config object in your Rollup config.
As always, your mileage may vary.