Repository navigation
UnhandledPromiseRejectionWarning on Node 7.7.2 #1776
Description
Activity
Can reproduce in Linux Mint 18.1 with the same node/npm versions.
Problem can be resolved by downgrading node to 7.7.1 or older. The problem appeared after upgrading node to 7.7.2.
Reacted by Ramzi Youssef, Noushad, Eric, Syed Anab Imam, Fernando Pascoal and sanmuThis problem seems to be caused by
detect-port:1.0.1, used by react-scripts. It causes an error indetect-port/lib/detect-port.json line 61socket.connect(...).detect-portis currently at version 1.1.0 which features a different approach of port detection. This version resolves the error for node v7.7.2, and also works with 7.6.0 and 7.7.1.The Travis build test of version 1.1.0 of
detect-portseems to fail, because the test is using node v4.8.0. On node 7.6.0, 7.7.1 and 7.7.2 the tests complete without any problems.As the minimum node version of
react-scriptsis>=4I am not sure if upgrading the version ofdetect-portinpackage.jsoninreact-scriptsis an acceptable solution asdetect-ports:1.1.0only passes its test on node version>=6.Reacted by Arthur, Roman Datsiuk, James McAllister, Anej Gorkič, James, Cory Robinson, ZoranZilicFTN and AJReacted by James McAllister, Cory Robinson and ZoranZilicFTNWe do not support Node 7, so the official recommendation would be to downgrade to the latest LTS.
Currently, that is Node v6.10.0.However, we understand this might be desirable. Would one of you like to send a PR adding Node 7 to the CI (only one of the test cases) and resolving this issue?
Thanks!/cc @whelmich
(We definitely should support Node 7 tho)
Reacted by Tai, Will, MW, Jiawen Geng, Arne Wiese, Arthur, rubendw, Jorge Gonzalez, Linsy Joyner, Marshall Bowers and 14 moreI get the same error in MacOS El Capitan and Ubuntu (both node 7). Weird thing is that in Ubuntu it still runs and starts the server, but doesnt detect any changes to files. In MacOS, it just quits.
(We definitely should support Node 7 tho)
We should probably run all test cases on Node 7 then. 🤷♀️
Node 8 comes out in a month though, which I assume means we would drop Node 7 support. Worth waiting?
Reacted by Mr.Cheng and Mahathi VempatiReacted by Arthur Stolyar, Daniel Tamkin and Mr.ChengReacted by Arthur Stolyar, Daniel Tamkin and Mr.ChengI don't think we should skip supported versions, it would be confusing.
Reacted by Cory Robinson and Arthur StolyarIt can be bug of Node 7.7.2 and if it is, it should be fixed by nodejs/node#11762
+i think that promise should be
catchsomewhereReacted by dan, Patrick Vice and Cory RobinsonAh, brilliant @vhain! This definitely looks like a regression then. 😄
Reacted by Juwan Yoo- changed the title
[-]UnhandledPromiseRejectionWarning in Windows 10[/-][+]UnhandledPromiseRejectionWarning on Node 7.7.2[/+]on Mar 9, 2017 After upgrading
detect-portin react-scripts to 1.1.0, I can run create-react-app without any issues on node 4.8.0, 6.10.0 and 7.7.2. So upgrading it could still be a solution, without impacting the minimal node version.Travis/tests failing on
detect-port:1.1.0with node <6 as mentioned earlier, seem to be related to its test dependency only. It doesn't withhold the package from working on node <6 when used with react-scripts. Though, I'm not sure if this may influence any other create-react-app tests somehow.Want to send a PR enabling tests on Node 7 + bumping the version?
19 remaining items
Looks like we need to bump
detect-portto 1.1.1: node-modules/detect-port#16 (comment)PR, anyone?
- added a commit that references this issue
on Apr 17, 2017 - added a commit that references this issue
on May 16, 2017 - added a commit that references this issue
on May 31, 2017 - added a commit that references this issue
on Aug 2, 2017 For any newbies running into this bug, I fixed it by downgrading NPM to the LTS (latest stable version) of 6.11.2.
Reacted by Cole Chamberlain, Esteban Felix and Christo OosthuizenHad a similar issue using npm to install. Fixed by removing both
npm-modulesandpackage-lock.json(a variant of @gaearon's comment above)说中文撒大佬们
Reacted by zhaozhiming, viking, Lian ShengYu, 人间烟火, Nemanja Milosavljevic, Sause, Nivolk, Yaxian, Ming, Mobile Automation and 3 moreReacted by Shannon Feng, Nivolk, asamoon, Andre Aldana, Htun Myint Winn and Jean PierreReacted by Vyacheslav Goreev, Nivolk, AzaeI and Henry Roeland- locked and limited conversation to collaborators
on Jan 20, 2019
Description
Bug
Expected behavior
should not return a UnhandledPromiseRejectionWarning
Actual behavior
Environment
Run these commands in the project folder and fill in their results:
npm ls react-scripts(if you haven’t ejected):node -v:npm -v:Then, specify:
Windows 10 in Linux Bash Shell Build 15048 (Creator Update)
To Reproduce