Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-toastr 2.8.2 breaking build #838

Closed
aliabbas opened this issue Nov 16, 2016 · 70 comments
Closed

react-toastr 2.8.2 breaking build #838

aliabbas opened this issue Nov 16, 2016 · 70 comments
Labels

Comments

@aliabbas
Copy link

when webpacking my application with react-bootstrap-table, the react-toastr@^2.8.0 dependecy pulls in 2.8.2 as it should but I'm getting the following error

.//react-bootstrap-table//react-toastr/~/react/lib/ReactTransitionEvents.js
Module not found: Error: Cannot resolve module 'react-dom/lib/getVendorPrefixedEventName'

i'm using node 4.3.1, npm 2.15.1

@sgentile
Copy link

Not sure if related, but I got a reactDOM error with react-toastr using the very new 15.4.0

@kellyi
Copy link

kellyi commented Nov 16, 2016

I encountered this issue, too. I think removing the caret from this line in package.json would fix it by pinning it to always use react-toastr 2.8.0:

https://github.com/AllenFang/react-bootstrap-table/blob/master/package.json#L67

@madeinfree
Copy link
Contributor

Hi, @aliabbas @sgentile @kellyi I see the related issue from tomchentw/react-toastr#86

@kellyi
Copy link

kellyi commented Nov 17, 2016

It seems like updating React and ReactDOM to 15.4.0 remedied this issue when using v2.5.8 of this library.

@AllenFang
Copy link
Owner

AllenFang commented Nov 17, 2016

Just like @kellyi said, I think fix the verion of react-toastr is a workaround currently.

@gravitycode
Copy link

Oh no! the damn caret.

@AllenFang
Copy link
Owner

Fixed on v2.5.9, please upgrade, Solve it by fix react-toastr on v2.8.0

@mangreen
Copy link

mangreen commented Nov 22, 2016

After changed to install [email protected], I still encountered this issue.
My react is 0.14.8 and react-dom is 0.14.7

module.js:338
throw err;
^
Error: Cannot find module 'react-dom/lib/getVendorPrefixedEventName'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (/Users/XXXXX/Workspace/test/node_modules/react-bootstrap-table/node_modules/react-toastr/node_modules/react/lib/ReactTransitionEvents.js:15:34)
at Module._compile (module.js:460:26)
at Module._extensions..js (module.js:478:10)
at Object.require.extensions.(anonymous function) [as .js] (/Users/XXXXX/Workspace/test/node_modules/babel-core/lib/api/register/node.js:214:7)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)

@vapon
Copy link

vapon commented Nov 22, 2016

Hi, that is true.
[email protected] doesn't resolve the problem.
"Module not found: Error: Cannot resolve module 'react-dom/lib/getVendorPrefixedEventName'"

@gravitycode
Copy link

i finally updated to react 15.4.0. Although I think not in all scenarios this is a viable solution.
I also had to update react-hot-loader

@madeinfree
Copy link
Contributor

madeinfree commented Nov 22, 2016

I think this problem from React 15.4.0, I try to change react-toastr react-dom version into 15.3.0 and problem be resolved, react-toastr use below

"dependencies": {
  "react-dom": "^0.14.0 || ^15.0.0"
}

so it will install react-dom 15.4.0 by itself

-- version

  • react-bootstrap-table 2.5.9
  • react 0.14.8
  • react-dom 0.14.8
  • react-toastr 2.8.0
    • react-dom 15.3.0

--- Edit ---

@AllenFang
Copy link
Owner

HI everyone, that's my fault, its a invalid fixed. Any solution?

@AllenFang AllenFang reopened this Nov 22, 2016
@vapon
Copy link

vapon commented Nov 22, 2016

That is the example how caret dependencies can ruin the build. My project become invalid after react 15.4.0 was released (https://facebook.github.io/react/blog/2016/11/16/react-v15.4.0.html)
Which version of the react-bootstrap-table uses react-toastr 2.4.0 ? I might downgrade for now.

@AllenFang
Copy link
Owner

@AllenFang
Copy link
Owner

How about fork react-toastr to my repo and link it with git repo url in package.json

@madeinfree
Copy link
Contributor

madeinfree commented Nov 22, 2016

agree! maybe this is the temporary solution to fix this problem when react-toastr didn't fix this problem.

@vapon
Copy link

vapon commented Nov 22, 2016

Thank you very much! Will check which solution fits better.

vapon pushed a commit to vapon/react-bootstrap-table that referenced this issue Nov 22, 2016
@kellyi
Copy link

kellyi commented Nov 22, 2016

Upgrading the top-level React & React-DOM dependencies to 15.4.0 fixed this issue for me.

I believe the problem's that React-Toastr's using an undocumented API which was done away with in 15.4.0. The dependency started breaking immediately after React 15.4 was released -- and this was published:

https://facebook.github.io/react/blog/2016/11/16/react-v15.4.0.html

I think having the latest React installed at the top level will fix it temporarily, although I also think the React-Toastr dependency will fail again whenever the React version's incremented. A long-term fix probably has to involve React-Toastr adjusting how it addresses the React & React-DOM APIs.

@kellyi
Copy link

kellyi commented Nov 22, 2016

@AllenFang I think using a forked version of React-Toastr with the React/React-DOM-dependencies pinned at whatever version you want for this would work, too.

It looks as if this might be the/one of the culprits in React-Toastr:

https://github.com/tomchentw/react-toastr/blob/b0fadc4afd51d381b983ce499d6cdfb667d319d2/lib/ToastMessage/animationMixin.js#L7

@AllenFang
Copy link
Owner

I think using a forked version of React-Toastr with the React/React-DOM-dependencies pinned at whatever version you want for this would work, too.

yes, I'll fix it later :) Thanks all you guys give these feedback 👍

@AllenFang
Copy link
Owner

hi all, I've released v2.5.10, I think it could fix this issue, please let me know if anything goes wrong. Any feedback is welcome :) thanks.

@yschoueri
Copy link

It doesn't work for me with package.json dependency
"react-bootstrap-table": "2.5.10"

I get the following error/warning when running npm install

`-- [email protected]
  +-- UNMET PEER DEPENDENCY react@^0.14.0 || <15.4.0
  `-- [email protected]  (git+https://github.com/AllenFang/react-toastr.git#777bb9a700de183bd123e9f6e2845164cd77ed87)
    +-- [email protected]
    `-- [email protected]

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN [email protected] requires a peer of react@^0.14.0 || <15.4.0 but none was installed.

and this one when starting my server in hot reload

ERROR in ./~/react-bootstrap-table/lib/toolbar/ToolBar.js
Module not found: Error: Cannot resolve module 'react-modal' in C:\Users\yschoueri.STW\Documents\Code\bidconf-ui\node_modules\react-bootstrap-table\lib\toolbar
 @ ./~/react-bootstrap-table/lib/toolbar/ToolBar.js 25:18-40

ERROR in ./~/react-toastr/~/react-dom/index.js
Module not found: Error: Cannot resolve module 'react/lib/ReactDOM' in C:\Users\yschoueri.STW\Documents\Code\bidconf-ui\node_modules\react-toastr\node_modules\react-dom
 @ ./~/react-toastr/~/react-dom/index.js 3:17-46

@Shaywei
Copy link

Shaywei commented Nov 22, 2016

I am getting erros on npm install:

ERROR in ./~/react-bootstrap-table/lib/toolbar/ToolBar.js
Module not found: Error: Cannot resolve module 'react-modal' in /Users/shayweiss/git/.../frontend/node_modules/react-bootstrap-table/lib/toolbar
 @ ./~/react-bootstrap-table/lib/toolbar/ToolBar.js 25:18-40

ERROR in ./~/react-toastr/~/react-dom/index.js
Module not found: Error: Cannot resolve module 'react/lib/ReactDOM' in /Users/shayweiss/git/.../frontend/node_modules/react-toastr/node_modules/react-dom
 @ ./~/react-toastr/~/react-dom/index.js 3:17-46

Reverting to 2.5.8 solved the problem.

@qiusli
Copy link

qiusli commented Nov 22, 2016

Got the following error building my project, not sure why. Any suggestions?

npm ERR! git clone --template=h:\dash\npm\2\npm-cache_git-remotes_templates --mirror https://github.com/AllenFang/reac
t-toastr.git h:\dash\npm\2\npm-cache_git-remotes\git-https-github-com-AllenFang-react-toastr-git-72d29d72: Cloning into
bare repository 'h:\dash\npm\2\npm-cache_git-remotes\git-https-github-com-AllenFang-react-toastr-git-72d29d72'...
npm ERR! git clone --template=h:\dash\npm\2\npm-cache_git-remotes_templates --mirror https://github.com/AllenFang/reac
t-toastr.git h:\dash\npm\2\npm-cache_git-remotes\git-https-github-com-AllenFang-react-toastr-git-72d29d72:
npm ERR! git clone --template=h:\dash\npm\2\npm-cache_git-remotes_templates --mirror https://github.com/AllenFang/reac
t-toastr.git h:\dash\npm\2\npm-cache_git-remotes\git-https-github-com-AllenFang-react-toastr-git-72d29d72: fatal: Unabl
e to find remote helper for 'https'
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "c:\PROGRA1\nodejs\63847A1.1\node.exe" "c:\PROGRA1\nodejs\63847A1.1\node_modules\npm\bin\np
m-cli.js" "install"
npm ERR! node v6.3.1
npm ERR! npm v3.10.3
npm ERR! code 128

npm ERR! Command failed: git -c core.longpaths=true clone --template=h:\dash\npm\2\npm-cache_git-remotes_templates --m
irror https://github.com/AllenFang/react-toastr.git h:\dash\npm\2\npm-cache_git-remotes\git-https-github-com-AllenFang-
react-toastr-git-72d29d72
npm ERR! fatal: Unable to find remote helper for 'https'
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request:

@sgentile
Copy link

So I have a build that was using "react-bootstrap-table": "^2.5.6",

Now it's started failing on me today..

ERROR in .//react-bootstrap-table/lib/toolbar/ToolBar.js
Module not found: Error: Cannot resolve module 'react-modal' in
.../client/node_modules/react-bootstrap-table/lib/toolbar
@ ./
/react-bootstrap-table/lib/toolbar/ToolBar.js 25:18-40

ERROR in .//react-toastr//react-dom/index.js
Module not found: Error: Cannot resolve module 'react/lib/ReactDOM' in
.../client/node_modules/react-toastr/node_modules/react-dom
@ .//react-toastr//react-dom/index.js 3:17-46

"react": "^15.3.2",
"react-addons-css-transition-group": "^15.3.2",
"react-bootstrap": "^0.30.3",
"react-bootstrap-table": "^2.5.6",
"react-datetime": "^2.6.0",
"react-dom": "^15.3.1",

On Tue, Nov 22, 2016 at 12:04 PM, Allen [email protected] wrote:

hi all, I've released v2.5.10, I think it could fix this issue, please
let me know if anything goes wrong. Any feedback is welcome :) thanks.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#838 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAIFNJuVHUCNDG0nEu7iEBORxwKIWJyPks5rAyCGgaJpZM4K0Sl8
.

@rahul1059
Copy link

@AllenFang I did following steps.

  • Removed react-bootstrap-table and installed v2.6.0.

  • Removed node modules and re installed everything with react-bootstrap-table v2.6.0

Both of these throwing same error.

Error: Cannot find module 'react-dom/lib/getVendorPrefixedEventName' from 'C:.....\node_modules\react-bootstrap-table\node_modules\react-toastr\node_modules\react\lib'

@AllenFang
Copy link
Owner

@rahul1059, I can reproduce it on npm@2 but not in npm@3. I'm still figure why in npm@2 the react-toastr which installed with [email protected] instead of [email protected]. The problem still remain even I set perrDependencies like https://github.com/AllenFang/react-toastr/blob/test/react-version/package.json#L90

@rahul1059
Copy link

@AllenFang Any update for npm@2?

@AllenFang
Copy link
Owner

Currently, I still figure out why, I know some solution, but no any solution is well. For now, after v2.6.0 only [email protected] with npm@2 still have issues. I'll keep to fix this remain problem. sorry for waiting a long time.

@jamiguet
Copy link

@AllenFang Are the changes going to be proposed to upstream and integrated into a version?
I have the problem that I build without access to the internet, so I need full releases so that my local repo can download them.

Please advise on toastr releases that integrate the fix you need.

@olegserov
Copy link

olegserov commented Dec 12, 2016

I had similar problem, what I did:
0. removed node_modules

  1. installed npm3.
  2. upgraded dependencies (see attached file)

screen shot 2016-12-12 at 16 58 27

  1. looked at npm3 list and found " ERR! peer dep missing" ... react-dom.
  2. npm3 install react-dom react-overlays react-prop-types --save-dev
  3. Now it builds.

@AllenFang
Copy link
Owner

@jamiguet, is this #861 ? we are solving it. Need some time, a lots of thing need to do. Sorry ;(

@af-fess
Copy link

af-fess commented Jan 2, 2017

I still get the same issue, I use latest version 2.8.2 with dependancies:

  "react": "^0.14.7",
    "react-bootstrap": "^0.30.7",
    "react-bootstrap-table": "^2.8.2",
    "react-dom": "~0.14.7",

Inside react-bootstrap-table:

  "dependencies": {
    "classnames": "^2.1.2",
    "@allenfang/react-toastr": "2.8.2"
  },
Error in compilation in webpack: ModuleNotFoundError: 
Module not found:
 Error: Cannot resolve module 'react-dom/lib/getVendorPrefixedEventName' in /Users/.../client/node_modules/react-bootstrap-table/node_modules/@allenfang/react-toastr/node_modules/react/lib

/Users/.../client/webpack.vendors.config.js:56
                    throw new Error('Error in compilation in webpack: ' + stats.compilation.errors);

@AllenFang
Copy link
Owner

AllenFang commented Jan 2, 2017

@af-fess, what's the version of npm and could you show me your node_modules by following command

npm list --depth=1 | grep react

BTW, could you remove the node_modules and install again?

@af-fess
Copy link

af-fess commented Jan 2, 2017

@AllenFang thanks for quick response

npm - 2.5.18

$ npm list --depth=1 | grep react
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
├─┬ [email protected]
│ ├── [email protected] extraneous
│ ├── [email protected] extraneous
│ ├── [email protected]
│ ├── [email protected] extraneous
│ ├── [email protected]
│ ├── [email protected] extraneous
│ ├── [email protected] extraneous
│ ├── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
├─┬ [email protected]
│ └── [email protected]

also I tried to reinstall all node_modules, got the same error.


The problem is solved by updating react/react-dom to latest 15.4.1 that a cannot use for today (have a lot of deps)

@ianks
Copy link
Contributor

ianks commented Jan 18, 2017

@AllenFang Maybe we should just ditch react-toastr tbh. I don't see this issue being fixed anytime soon and its forcing us to be locked at older versions of React.

@AllenFang
Copy link
Owner

@ianks, yap, that issue still remain until now, actually I had tried the react-s-alert but it also have the same problem. Anyway, I'll try it again in recently, maybe I just got something wrong.

@zekedroid
Copy link

Any updates on this issue?

@gengjiawen
Copy link

Is it possible we remove this library and related function ?

@AllenFang
Copy link
Owner

I really want to remove it but it will be a big change

@zekedroid
Copy link

@AllenFang why not revert to a version of react-toaster that ISN'T using a scoped package. Why is the dependency listed with your scope? If it's because you forked and changed the library, maybe just change it to a different name so it doesn't clash? Or release an alpha version. Either way, this seems like it's not an issue with the library, just how it's being installed and depended on.

I know npm can be a pain, so maybe let us know what you've tried and we may be able to help!

@AllenFang
Copy link
Owner

please check #1216, if you have any concern or question, let me know in #1216

@AllenFang
Copy link
Owner

After v4.0.0, react-bootstrap-table doesn't use react-toastr` anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.