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

Update to fsevents 1.2.13 #159

Closed
amoerie opened this issue May 11, 2020 · 6 comments
Closed

Update to fsevents 1.2.13 #159

amoerie opened this issue May 11, 2020 · 6 comments

Comments

@amoerie
Copy link

amoerie commented May 11, 2020

Would you consider releasing a new patch that includes the last release of fsevents? In 1.2.13, they claim to have fixed the issue where "npm ci" on Windows would always try to install fsevents, causing build errors.

We've had to switch our entire CI to using "npm install", with all of the associated downsides, just to avoid this problem.

In webpack 5, you are already using fsevents 2 which does not have this issue, but this fix would be very welcome for those of us still stuck on webpack 4 for a while.. :-)

Thank you for considering!

@dlopuch
Copy link

dlopuch commented May 11, 2020

[edit] nm, looks like this is all being covered in #130


fsevents@1.2.13 has lots of native extension compilation errors on Node LTS v12.16.3. It's being brought in through chokidar:

┬ watchpack@1.6.1
└─┬ chokidar@2.1.8
  └── fsevents@1.2.13

fsevents 1 has been EOL'd. fsevents 2 is being used by chokidar 3, so bumping the chokidar dependency should do the trick.

As it is now, doing a clean npm install with something using watchpack@1.6.1 and LTS node fails with a long output like this:

npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.

> fsevents@1.2.13 install /Users/dlopuch/developer/nanogrid/nanostatic/node_modules/@babel/cli/node_modules/fsevents
> node install.js

  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node

> fsevents@1.2.4 install /Users/dlopuch/developer/nanogrid/nanostatic/node_modules/fsevents
> node install

node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v72-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for fsevents@1.2.4 and node@12.16.3 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:202:
In file included from ../../nan/nan_converters.h:67:
../../nan/nan_converters_43_inl.h:22:1: warning: 'ToBoolean' is deprecated: ToBoolean can never throw. Use Local version. [-Wdeprecated-declarations]
X(Boolean)
^

<....lots and lots of native compilation trace....>


../fsevents.cc:85:50: error: use of undeclared identifier 'exports'
void FSEvents::Initialize(v8::Handle<v8::Object> exports) {
                                                 ^
../fsevents.cc:85:58: error: expected ';' after top level declarator
void FSEvents::Initialize(v8::Handle<v8::Object> exports) {
                                                         ^
                                                         ;
30 warnings and 12 errors generated.
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/dlopuch/.nvm/versions/node/v12.16.3/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:310:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.3.0

@amoerie
Copy link
Author

amoerie commented May 12, 2020

I've read the issue you linked to, and it sounds like there won't be a solution for webpack 4 anymore. Is there any acceptable workaround for this issue that will allow the use of "npm ci" again?

It's insane how unstable the NPM ecosystem is, I've been needing to put out fires left and right every few months since we're using it, and this latest issue doesn't even seem to have a decent workaround.

@rajivshah3
Copy link

You can try doing npm update fsevents --depth X, but for some reason that silently fails for me. I resorted to editing the shrinkwrap manually 😅 :

     "fsevents": {
-      "version": "1.2.12",
-      "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.12.tgz",
-      "integrity": "sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q==",
+      "version": "1.2.13",
+      "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
+      "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
       "dev": true,
       "optional": true,
       "requires": {
         "bindings": "^1.5.0",
-        "nan": "^2.12.1",
-        "node-pre-gyp": "*"
+        "nan": "^2.12.1"
       }

You can get the hash for integrity with npm view fsevents@1.2.13

@amoerie
Copy link
Author

amoerie commented May 15, 2020

That's not a solution, because npm install overwrites the shrinkwrap or package-lock file each time.
The solution to that is using "npm ci", which is how this issue got started...

@rajivshah3
Copy link

rajivshah3 commented May 15, 2020

Right, but npm ci does not overwrite the shrinkwrap. If you manually edit it as I mentioned and then only use npm ci, you should be ok. It’s just a workaround but not a complete solution

@sokra
Copy link
Member

sokra commented Jun 3, 2020

fsevents 1.2.13 is in the supported range. You can fix that on your side by updating the lockfile.

@sokra sokra closed this as completed Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants