Semantic-UI-React: Module not found: Error: Can't resolve './EventStack' in './node_modules/semantic-ui-react/dist/es/lib/eventStack'
Hi! Thanks very useful library. π
Bug Report
I got a build error in Linux (alpine linux) environment. π When in Mac environment, I donβt get an error.
I think that eventStack.js must be EventStack.js.
Steps
- Add semantic-ui-react to the package.json dependencies.
- run
yarn
- run
yarn build
: I use webpack & typescript. - I got error.
Actual Result
I got following error.
ERROR in ./node_modules/semantic-ui-react/dist/es/lib/eventStack/index.js
Module not found: Error: Can't resolve './EventStack' in '/root/project/app/node_modules/semantic-ui-react/dist/es/lib/eventStack'
@ ./node_modules/semantic-ui-react/dist/es/lib/eventStack/index.js 1:0-38 2:19-29
@ ./node_modules/semantic-ui-react/dist/es/lib/index.js
@ ./node_modules/semantic-ui-react/dist/es/collections/Grid/GridRow.js
@ ./node_modules/semantic-ui-react/dist/es/index.js
@ ./src/App.tsx
@ ./src/index.tsx
Version
0.81.0
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 5
- Comments: 15 (5 by maintainers)
Fixed in
semantic-ui-react@0.81.1
. The tarball also includes the properly casedEventStack.js
file.Please re-open. The file in
dist/lib/eventStack
iseventStack.js
starting with a lower βeβ instead of capital βEβ which is required bydist/lib/eventStack/index.js
:Did
rm -rf node_modules yarn.lock
. Same file gets downloaded.Hey folks, Iβll release a patch for this as soon I finish investigating why the camelCased
eventStack.js
was built. Standby.Try to reinstall deps fully, the
master
branch has a needed file, see the folderRename
/node_modules/semantic-ui-react/dist/es/lib/eventStack/eventStack.js to /node_modules/semantic-ui-react/dist/es/lib/eventStack/EventStack.js
fix the error
@tkw1536 Thanks. Your solution helped fix the bug on my machine
I reopened issue, the problem needs an investigation.
I tried to download the tar boll from https://registry.npmjs.org/semantic-ui-react/-/semantic-ui-react-0.81.0.tgz.
And I extract it. I got
eventStack.js
file. Is this the correct file? @layershifterThe
master
branch and thev0.81.0
tag has the correctly namedEventStack.js
file. I tried to perform the build locally and everything went okay.The
v0.81.0
contains a valid file in thesrc
folder, howeverdist
folders contains a wrongeventStack.js
file π Merged #2870 with same problem.An example on codesandbox.
@levithomason can you check, please? As Iβm remember youβre running builds locally.
Please reopen this issue π @layershifter
I am affected by this issue as well, it is especially annoying because this only occurs in my automated tests (which run on Travis CI / Linux), and not in my development environment (Mac OS).
I furthermore tried the fix from @wallena3, and noticed that it did not work in commonjs environments. To completely fix the issue, I had to use:
Having to add these lines everywhere is less than optimal, as it is no longer possible to install
semantic-ui-react
as apackage.json
dependency and manual intervention is required.Can this issue please be re-opened and fixed?