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

Can not run webpack-dev-server in Node V12 #6942

Closed
junjie-lean opened this issue Apr 28, 2019 · 7 comments
Closed

Can not run webpack-dev-server in Node V12 #6942

junjie-lean opened this issue Apr 28, 2019 · 7 comments

Comments

@junjie-lean
Copy link

This isn't a bug report.
create-react-app不能在nodeV12的环境下启动webpack-dev-server,我把node环境降级到node11.5就解决了这个问题。

@bugzpodder
Copy link

I tried node v12 and it worked fine for me. Please provide a full repo as well as error message.

@junjie-lean
Copy link
Author

Thx repo:
I used webpack-dev-server in the Create-React-App, when CRA start a dev server,It build a package,and when it finish,error is happen,here error message you are:

Starting the development server...


Compiled successfully!


You can now view part2-react in the browser.

  Local:            http://localhost:12121/
  On Your Network:  http://10.10.1.30:12121/

Note that the development build is not optimized.
To create a production build, use npm run build.




#
# Fatal error in , line 0
# Check failed: U_SUCCESS(status).

#
#
#
#FailureMessage Object: 0x7ffeefbfb2d0

And when i downgrade to nodeV12, It begin work without error;

version in package.json:

    "webpack": "4.19.1",
    "webpack-dev-server": "^3.2.1",
    "webpack-manifest-plugin": "2.0.4",
    "workbox-webpack-plugin": "3.6.3"

It is also possible that the other dependencies packages of CRA are not compatible with node12, Is it possible?

@thib3113
Copy link

same error here, running the sample project from CRA produce the same error :

npx create-react-app my-app
cd my-app
npm start

Seems to work for the build, only failing in dev mode ( so with webpack-dev-server ) .
( same error on my custom build from an old cra )

@Nowheresly
Copy link

I have issues as well after upgrading to nodejs v12.1.0 when it comes to use the dev mode.
Here are my error logs:


/Users/user/Documents/git/someproject/src/main/frontend/node_modules/chokidar/lib/fsevents-handler.js:28
  return (new fsevents(path)).on('fsevent', callback).start();
          ^

TypeError: fsevents is not a constructor
    at createFSEventsInstance (/Users/user/Documents/git/someproject/src/main/frontend/node_modules/chokidar/lib/fsevents-handler.js:28:11)
    at setFSEventsListener (/Users/user/Documents/git/someproject/src/main/frontend/node_modules/chokidar/lib/fsevents-handler.js:82:16)
    at FSWatcher.FsEventsHandler._watchWithFsEvents (/Users/user/Documents/git/someproject/src/main/frontend/node_modules/chokidar/lib/fsevents-handler.js:252:16)
    at FSWatcher.<anonymous> (/Users/user/Documents/git/someproject/src/main/frontend/node_modules/chokidar/lib/fsevents-handler.js:386:25)
    at LOOP (fs.js:1622:14)
    at processTicksAndRejections (internal/process/task_queues.js:82:9)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

This is maybe related to this issue: fsevents/fsevents#274

If I add the following line to my package.json file:

 "fsevents": "1.2.8"

I have no more any problem to start the dev mode.

Without the line above, the default version of fsevents is 1.2.4, which seems to be not enough to work with nodejs v12 apparently.

@thib3113
Copy link

thib3113 commented May 1, 2019

@Nowheresly you're problem is different . Fsevents is only installed on macOs, and your error is really different . I think it's better for you to ask an update of chokidar

@thib3113
Copy link

thib3113 commented May 2, 2019

@junjie-lean Node V12.1.0 ( out 2019-04-29 ) resolve the problem . Same on your side ?

@junjie-lean
Copy link
Author

@thib3113 yes, it's works in Node V12.1.0 , And what is change in V12.1 about CRA?

@lock lock bot locked and limited conversation to collaborators May 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants