React-pdf: [SOLVED] Problem in installation of the lib yoga-layout

Created on 16 Jun 2018  ·  11Comments  ·  Source: diegomura/react-pdf

I tried installing the dependency on my project but I got this error message, and I do not know how to solve it.

Someone can help me, please? Thanks!

My SO: Linux Deepin 15.5
uname -a
_Linux tgmarinho-PC 4.14.0-deepin2-amd64 #1 SMP PREEMPT Deepin 4.14.12-2 (2018-01-06) x86_64 GNU/Linux_

`
tgmarinho@tgmarinho-PC:~/Development/shalomapp$ yarn add @react-pdf/core
yarn add v1.7.0
info No lockfile found.
[1/4] Resolving packages...
warning @codeftw/future-web-graphql-date-time-resolver > [email protected]: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
warning [email protected]: bcrypt < v2.0.0 is susceptible to bcrypt wrap-around bug. Upgrade to bcrypt >= v2.0.0 for improved support for newer bcrypt hashes
warning [email protected]: Use @material-ui/icons instead
warning [email protected]: You can now upgrade to @material-ui/core
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "classnames@^2.2.5".
warning " > [email protected]" has unmet peer dependency "@material-ui/core@^1.0.0-rc.0".
warning " > [email protected]" has unmet peer dependency "@types/googlemaps@^3.0.0".
warning " > [email protected]" has unmet peer dependency "@types/markerclustererplus@^2.1.29".
warning " > [email protected]" has unmet peer dependency "@types/react@^15.0.0 || ^16.0.0".
[4/4] Building fresh packages...
[-/4] ⢀ waiting...
[2/4] ⢀ bcrypt
[-/4] ⢀ waiting...
error /home/tgmarinho/Development/shalomapp/node_modules/yoga-layout: Command failed.
Exit code: 1
Command: npm run build:node
Arguments:
Directory: /home/tgmarinho/Development/shalomapp/node_modules/yoga-layout
Output:

[email protected] build:node /home/tgmarinho/Development/shalomapp/node_modules/yoga-layout
npm run copy-sources && autogypi && node-gyp configure build

[email protected] copy-sources /home/tgmarinho/Development/shalomapp/node_modules/yoga-layout
! npm -s run is-monolithic || (rsync -r --checksum --delete ../yoga/ sources/yoga/)

make: Entering directory '/home/tgmarinho/Development/shalomapp/node_modules/yoga-layout/build'
COPY Release/obj.target/nbind/geni/symbols.txt
CXX(target) Release/obj.target/nbind/sources/yoga/Utils.o
make: g++: Command not found
make: * [Release/obj.target/nbind/sources/yoga/Utils.o] Error 127
nbind.target.mk:141: recipe for target 'Release/obj.target/nbind/sources/yoga/Utils.o' failed
make: Leaving directory '/home/tgmarinho/Development/shalomapp/node_modules/yoga-layout/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.14.0-deepin2-amd64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /home/tgmarinho/Development/shalomapp/node_modules/yoga-layout
gyp ERR! node -v v8.11.2
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build:node: npm run copy-sources && autogypi && node-gyp configure build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build:node script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above
`

Most helpful comment

I don't believe this is solved our team is running into this error and can't install the repo.

All 11 comments

error /home/tgmarinho/Development/shalomapp/node_modules/yoga-layout: Command failed.

I created a simple project, just npm init and yarn add @react-pdf/core, so I got the message:
`yarn add @react-pdf/core
yarn add v1.7.0
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "@react-pdf/core > [email protected]" has unmet peer dependency "react@^16.0.0".
warning " > @react-pdf/[email protected]" has unmet peer dependency "react@^16.0.0".
[4/4] Building fresh packages...
error /home/tgmarinho/Development/teste/node_modules/yoga-layout: Command failed.
Exit code: 1
Command: npm run build:node
Arguments:
Directory: /home/tgmarinho/Development/teste/node_modules/yoga-layout
Output:

[email protected] build:node /home/tgmarinho/Development/teste/node_modules/yoga-layout
npm run copy-sources && autogypi && node-gyp configure build

[email protected] copy-sources /home/tgmarinho/Development/teste/node_modules/yoga-layout
! npm -s run is-monolithic || (rsync -r --checksum --delete ../yoga/ sources/yoga/)

make: Entering directory '/home/tgmarinho/Development/teste/node_modules/yoga-layout/build'
COPY Release/obj.target/nbind/geni/symbols.txt
CXX(target) Release/obj.target/nbind/sources/yoga/Utils.o
make: g++: Command not found
nbind.target.mk:141: recipe for target 'Release/obj.target/nbind/sources/yoga/Utils.o' failed
make: Leaving directory '/home/tgmarinho/Development/teste/node_modules/yoga-layout/build'
make: * [Release/obj.target/nbind/sources/yoga/Utils.o] Error 127
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.14.0-deepin2-amd64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /home/tgmarinho/Development/teste/node_modules/yoga-layout
gyp ERR! node -v v8.11.2
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build:node: npm run copy-sources && autogypi && node-gyp configure build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build:node script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/tgmarinho/.npm/_logs/2018-06-16T01_08_32_586Z-debug.log
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.`

I checked it, but that's don't figure it out my problem. Thanks for while!

Hey @tgmarinho it seems that you version of linux does not have g++ installed as stated in the error message,

make: g++: Command not found

Does installing g++ with your linux distro package manager solve the problem?

@ferdinandsalis my notebook doesn't work well, I did reinstall of OS, I'll try that. Thanks!

Closing this at least until more news

@ferdinandsalis @diegomura thanks, my problem is done!

I don't believe this is solved our team is running into this error and can't install the repo.

me too. Maybe @diegomura we should give up yoga or at least have some other option?

In my case I downgraded node 13 to 11 ..

React Native Environment Info:
Binaries:
Node: 11.10.0 - /usr/local/bin/node
Yarn: 1.12.3 - /usr/local/bin/yarn
npm: 6.7.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
IDEs:
Android Studio: 3.0 AI-171.4443003
Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: ^0.59.10 => 0.59.10
npmGlobalPackages:
react-native-cli: 2.0.1

Was this page helpful?
0 / 5 - 0 ratings