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

'utility' file not found #1564

Closed
yerassyl94 opened this issue Oct 12, 2018 · 8 comments
Closed

'utility' file not found #1564

yerassyl94 opened this issue Oct 12, 2018 · 8 comments

Comments

@yerassyl94
Copy link

Node Version:
node 6.5.0
npm: 6.4.1

Platform: MacOS 10.14 Mojave
Compiler: Apple LLVM version 9.1.0 (clang-902.0.39.2)
Module: npm install

Mean.js project gives this message when run npm install

/Users/user/.node-gyp/6.5.0/include/node/v8.h:21:10: fatal error: 'utility' file not found
#include

@yerassyl94
Copy link
Author

Solved by changing MACOSX_DEPLOYMENT_TARGET from 10.7 to 10.9 in
Users/user/.node-gyp/6.5.0/include/node/common.gypi

@alexventuraio
Copy link

@yerassyl94 how exactly did you solve this? Where do you change that variable?

@refack refack self-assigned this Oct 16, 2018
@refack
Copy link
Contributor

refack commented Oct 16, 2018

Solved by changing MACOSX_DEPLOYMENT_TARGET from 10.7 to 10.9 in

Ohh you are both building with fairly old node versions...
Maybe post a PR to nodejs/node for the v6 branch?

@yerassyl94
Copy link
Author

@yerassyl94 how exactly did you solve this? Where do you change that variable?

//.node-gyp/6.5.0/include/node/common.gypi
find this file in your MacOS

@alexventuraio
Copy link

@yerassyl94 Thx I could fix this too!

@refack
Copy link
Contributor

refack commented Oct 16, 2018

FTR, possible workaround:

For users:

env CXXFLAGS="-mmacosx-version-min=10.9" npm install

For addon authors:

add this to your bindings.gyp (but as mentioned above test)

  'xcode_settings': {
    'MACOSX_DEPLOYMENT_TARGET': '10.9',
  },

@alexbaumgertner
Copy link

Try

CXXFLAGS="-mmacosx-version-min=10.9" LDFLAGS="-mmacosx-version-min=10.9" npm i

https://stackoverflow.com/questions/52545166/node-6-node-gyp-rebuild-for-hiredis-fails-on-macos

It works for me, Mac OS 10.14.1 (18B75), node version 6.11.3 (legacy project)

wmfgerrit pushed a commit to wikimedia/mediawiki-extensions-Popups that referenced this issue Dec 14, 2018
wdio-mocha-framework | 0.6.1  | 0.6.3
wdio-spec-reporter   | 0.1.4  | 0.1.5
webdriverio          | 4.13.1 | 4.14.1

Selenium tests were tested locally with these upgrades and passed.

Note: I had some difficulty in upgrading wdio-mocha-framework to the
latest version 0.6.4 on my mac os (10.14) and experienced a `'utility'
file not found` error when npm installed the 'fibers' package. This
appears to be a known problem relating to node-gyp and older versions of
node. [1] Running the following suggested command [2] worked
for me:

`CXXFLAGS="-mmacosx-version-min=10.9" LDFLAGS="-mmacosx-version-min=10.9" npm i`

However, it was a hassle. Therefore, I chose to upgrade to only
0.6.3 in which this problem doesn't occur.

[1] nodejs/node-gyp#1564
[2] nodejs/node-gyp#1564 (comment)

Bug: T209314
Change-Id: I0657ca5db4747b4ebb7aa0d01e2aeb97d6b2a7d0
@megharajsh
Copy link

Solved by changing MACOSX_DEPLOYMENT_TARGET from 10.7 to 10.9 in
Users/user/.node-gyp/6.5.0/include/node/common.gypi

Thanks, This resolved the issue

@refack refack removed their assignment Jul 22, 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

5 participants