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

Local build failing with node 13 #101

Closed
huijing opened this issue Dec 2, 2019 · 10 comments
Closed

Local build failing with node 13 #101

huijing opened this issue Dec 2, 2019 · 10 comments

Comments

@huijing
Copy link

huijing commented Dec 2, 2019

Encounter the following error upon running yarn command to install newly installed dependencies (airtable etc.)

error /Users/huijing/Sites/rk-community-site/node_modules/sharp: Command failed.
Exit code: 1
Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
Arguments: 
Directory: /Users/huijing/Sites/rk-community-site/node_modules/sharp
Output:
info sharp Using cached /Users/huijing/.npm/_libvips/libvips-8.7.4-darwin-x64.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=13.2.0 runtime=node arch=x64 libc= platform=darwin)
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info find Python using Python version 2.7.16 found at "/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python"
gyp info spawn /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
gyp info spawn args [
gyp info spawn args   '/usr/local/Cellar/node/13.2.0/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/huijing/Sites/rk-community-site/node_modules/sharp/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/Cellar/node/13.2.0/libexec/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/huijing/Library/Caches/node-gyp/13.2.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/huijing/Library/Caches/node-gyp/13.2.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/local/Cellar/node/13.2.0/libexec/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/huijing/Library/Caches/node-gyp/13.2.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/huijing/Sites/rk-community-site/node_modules/sharp',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  TOUCH Release/obj.target/libvips-cpp.stamp
  CXX(target) Release/obj.target/sharp/src/common.o
  CXX(target) Release/obj.target/sharp/src/metadata.o
  CXX(target) Release/obj.target/sharp/src/stats.o
../src/stats.cc:130:19: error: no matching member function for call to 'Set'
        channels->Set(i, channelStat);
        ~~~~~~~~~~^~~
/Users/huijing/Library/Caches/node-gyp/13.2.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/huijing/Library/Caches/node-gyp/13.2.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
1 error generated.
make: *** [Release/obj.target/sharp/src/stats.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/Cellar/node/13.2.0/libexec/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
gyp ERR! System Darwin 19.0.0
gyp ERR! command "/usr/local/Cellar/node/13.2.0/bin/node" "/usr/local/Cellar/node/13.2.0/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/huijing/Sites/rk-community-site/node_modules/sharp

Upon further investigation, it seems that sharp requires an update to resolve issues with Node.js 13, (refer to lovell/sharp#1909). There are multiple packages in this project that have a sharp dependency.

huijing pushed a commit that referenced this issue Dec 2, 2019
huijing pushed a commit to huijing/rk-community-site that referenced this issue Dec 2, 2019
@JennieJi
Copy link
Contributor

JennieJi commented Dec 2, 2019

Do have experience with sharp, so far it can only work on node v10 (just use nvm switching to v10 while work with it). The main issue is it still use node-gyp that has been removed from v11 or v12, so...

@huijing
Copy link
Author

huijing commented Dec 2, 2019

But documentation states it works with 12 and 13 though, and updating sharp version resolves the issue.

@ZeldOcarina
Copy link

Right I have this same problem on Node 12. I've had my production build crash and support keeps just closing my tickets.
Did you find a solution for Node 12?

@JennieJi
Copy link
Contributor

JennieJi commented Dec 3, 2019

Seems ok on v12.6, but I get Airtable graphql exception:

 ERROR #85907  GRAPHQL

There was an error in your GraphQL query:

- Unknown field 'allAirtable' on type 'Query'.

@ZeldOcarina
Copy link

I have handled by bumping sharp version to 0.23.3 in all of the fields where it was appearing in package.json.

@huijing
Copy link
Author

huijing commented Dec 4, 2019

Seems ok on v12.6, but I get Airtable graphql exception:

 ERROR #85907  GRAPHQL

There was an error in your GraphQL query:

- Unknown field 'allAirtable' on type 'Query'.

@thchia this is because of the API key, right? not a sharp issue i think

@thchia
Copy link
Member

thchia commented Dec 4, 2019

@huijing @JennieJi yes the errors about Airtable are due to not having an Airtable API key. The problem is being tracked in #103 which I hope to be able to tackle this weekend maybe.

@huijing
Copy link
Author

huijing commented Dec 4, 2019

Ok, so up to you if you wanna accept this and close.

@thchia
Copy link
Member

thchia commented Dec 4, 2019

I can test with some other node versions tonight.

thchia added a commit that referenced this issue Dec 4, 2019
Addresses #101, fix for machines running node 13
@thchia
Copy link
Member

thchia commented Dec 4, 2019

Closed in #102

@thchia thchia closed this as completed Dec 4, 2019
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