"No matching export in "esbuild-globals-plugin:@wordpress/element" for import "createElement""
mi-skam opened this issue · 7 comments
This is the output i get, while using node 16 and make
Hi @mi-skam,
i wonder how you executed the Makefile with Node v16 successfully since it will abort in this case :
Makefile:8: *** Expected Node version "v15.13.0" not installed (detected version: "v16.13.1"). Stop.
Anyway - even if I change the required Node version (in .nvmrc
) to - lets say node version v16.13.1
- so that the Makefile gets executed, everything works fine on my machine.
In other words : Unfortunately I cannot reproduce the issue on my system.
BUT - but i have a guess :-)
If I execute nvm use
on my system I get
Found '/home/lgersman/workspace/ix-article-esbuild/.nvmrc' with version <v15.13.0>
Now using node v15.13.0 (npm v7.7.6)
=> Could you verify that your Node environment also uses nvm version >= 7 ?
npm v7.* is the default for Node v15. And npm v7 (or greater) is also required for this project since it uses a npm 7 feature :
npm 7 will automatically install peerDependencies if they are not explicitly depended upon higher in the dependency tree.
=> Could you verify that your node_modules
folder (ls node_modules/@wordpress/
) contains the following packages
element escape-html hooks i18n icons primitives
Sure,
well I hacked the Makefile
to basically ignore the check for the version, as I used node 16 and npm 8, which hence should support this peerDependencies feature, right?
Cheers
u@win10-1:/mnt/c/Users/u/p/github/heise/lgersman/ix-article-esbuild-2021$ [dev]# npm -v
8.1.0
u@win10-1:/mnt/c/Users/u/p/github/heise/lgersman/ix-article-esbuild-2021$ [dev]# node -v
v16.13.0
UPDATE: But it seems it doesn't in the same way, as those directories are actually missing!
u@win10-1:/mnt/c/Users/u/p/github/heise/lgersman/ix-article-esbuild-2021$ [dev]# ls node_modules/
@babel binary-extensions csstype fill-range is-glob loose-envify picomatch regenerator-runtime
@types braces debug glob-parent is-number ms react sass
@wordpress chokidar esbuild is-binary-path js-tokens normalize-path react-dom scheduler
anymatch classnames esbuild-linux-64 is-extglob lodash object-assign readdirp to-regex-range
Yeah, I see.
Okidoki, I'll go into it.
P.S. I'm using Nix to provide the Shell environment.
https://gist.github.com/mi-skam/2dfa4af4e3e8d9249d73321e521aae59
Could you pull again from the repo and give it a try ?
works!
Gotcha - great !
Thanks for sharing this issue.