Closed wufeihuang closed 4 years ago
Experiencing the same with @shopify/polaris .
It appears it imports a package (@shopify/polaris-tokens) that looks as follows:
module.exports = {
colorBlack: 'rgb(0, 0, 0)',
colorWhite: 'rgb(255, 255, 255)',
durationBase: 200,
};
which @shopify/polaris
is importing like so:
import tokens, { durationBase } from '@shopify/polaris-tokens';
error is:
✖ snowpack failed to load node_modules/@shopify/polaris/index.es.js
'durationBase' is not exported by node_modules/@shopify/polaris-tokens/index.js, imported by node_modules/@shopify/polaris/index.es.js
Hmm, their build is a bit complex. Don't have any more pointers. Perhaps interesting to note that their codebase doesn't contain the above import as-is but it is generated by rollup.
I've had the same problem with flubber
. https://github.com/veltman/flubber
deck.gl and flubber should be fixed by https://github.com/pikapkg/snowpack/pull/421. You can try it out today using the pre-built PR package: https://github.com/pikapkg/snowpack/pull/421/checks
@shopify/polaris may be fixed as well, but not certain. If not, it will at least now be easier to fix
Moving to our message board
:truck: This issue has been moved! Continue the discussion on our project message board: https://www.pika.dev/npm/snowpack/discuss/299 • What is this?
Error occurs when importing
deck.gl
in the project.I started a project with
@snowpack/app-template-react
, and tried to usedeck.gl
in it. But it went wrong.I tried to import
deck.gl
in a new project withcreate-react-app
, it runs well.