vuejs / vue

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
http://v2.vuejs.org
MIT License
208k stars 33.69k forks source link

Build warnings in Mac OS and Node v12 (development) #11696

Open markjszy opened 4 years ago

markjszy commented 4 years ago

Version

2.6.11

Reproduction link

https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#development-setup

Steps to reproduce

On Mac OS Catalina (and probably prior versions), with Node v12 installed, follow the developer build instructions:

What is expected?

Successful report from yarn that all dependencies have been installed, with no warnings or errors

What is actually happening?

The following warning, followed by a slew of details (errors) concerning fsevents and one of its dependencies, nan

warning Error running install script for optional dependency: "/Users/mark/dev/vue/node_modules/fsevents: Command failed.


Dev dependency installation works fine with Node v10. I think I understand the problem and am curious about the right solution. Vue currently specifies webpack 4.x and karma 3.x as devDependencies, both of which ultimately bring in chokidar 2.x, which lists fsevents 1.2.x as an optional dependency.

Old fsevents is really the problem, in two ways:

I imagine the easiest solution, assuming nothing else breaks, would be to update the karma and webpack dependencies to some minimal viable version that does away with reliance on these older libs without breaking other expectations. In the meantime, we could also put a note in the build instructions for Mac users noting that they may need to move down to Node v10 if they want to avoid this problem. I understand that this might be obvious to some audience that intends to pitch in with Vue development in the first place, but it might help some.

posva commented 4 years ago

Contribution welcome to update the minimal dependencies in package.json (without committing changes to yarn.lock) so the project works on Node.js 12

ArjunDandagi commented 4 years ago

@posva i can take this up ,please guide me what needs to be updated

markjszy commented 4 years ago

@ArjunDandagi unless @posva thinks otherwise, I believe the two deps that need to be bumped up (due to their own indirect deps on old fsevents) are webpack and karma