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

Compile on node 10 (by updating npm packages) #85

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

apepper
Copy link

@apepper apepper commented Jan 21, 2020

The current master of react-reveal can not be installed on node 10 (at least on my mac with catalina):

> [email protected] install ~/react-reveal/node_modules/fsevents
> node install

node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module 'nan'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at [eval]:1:1
    at Script.runInThisContext (vm.js:122:20)
    at Object.runInThisContext (vm.js:329:38)
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at evalScript (internal/bootstrap/node.js:589:27)
gyp: Call to 'node -e "require('nan')"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp

Upgrading gulp to version 4 helped. I did not upgrade babel from version 6 to 7 (for now). I also did not upgrade react, but left the version as is.

Also most packages, that can be updated without breaking the tests where updated - this massively reduces the npm audit warnings.

gulp-babel v7 is still using babel v6:

> This readme is for gulp-babel v8 + Babel v7 Check the 7.x branch for docs with Babel v6 usage

Source: https://github.com/babel/gulp-babel/blob/master/README.md
> npm i -D gulp-clean@latest gulp-flatten@latest gulp-replace@latest gulp-uglify@latest
> npm update --depth=10 babel-cli babel-core babel-jest babel-plugin-add-module-exports babel-plugin-react-transform babel-plugin-transform-runtime babel-preset-es2015 babel-preset-react babel-preset-stage-0
> npm update --depth=10 enzyme enzyme-adapter-react-16
Motivation: This version still runs fine with the current tests. Also npm audit does report fewer vulnerabilities.
Version 23 breaks the current tests.
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

Successfully merging this pull request may close these issues.

1 participant