[GH-ISSUE #79] Cannot find module 'yoga-layout' #48

Closed
opened 2026-05-05 11:31:49 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @davidsylvestre on GitHub (Apr 4, 2018).
Original GitHub issue: https://github.com/kusti8/proton-native/issues/79

Hi.

(Sorry for the glitches in English, I had to use the translator)

By performing the quick-start of the documentation, I came across the error below.

>npm run start

> teste-proton@0.0.1 start c:\backup\projetos\javascript\teste-proton
> babel-node index.js

module.js:540
    throw err;
    ^

Error: Cannot find module 'yoga-layout'
    at Function.Module._resolveFilename (module.js:538:15)
    at Function.Module._load (module.js:468:25)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (c:\backup\projetos\javascript\teste-proton\node_modules\proton-native\bin\components\View.js:23:19)
    at Module._compile (module.js:643:30)
    at Module._extensions..js (module.js:654:10)
    at Object.require.extensions.(anonymous function) [as .js] (c:\backup\projetos\javascript\teste-proton\node_modules\babel-register\lib\node.js:152:7)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! teste-proton@0.0.1 start: `babel-node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the teste-proton@0.0.1 start 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!     C:\Users\david\scoop\persist\nodejs-lts\cache\_logs\2018-04-04T17_28_14_560Z-debug.log
{
  "name": "teste-proton",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node_modules/.bin/babel-node index.js",
    "build": "node_modules/.bin/babel index.js -d bin/",
    "package-linux": "bash ./scripts/appimage.sh"
  },
  "dependencies": {
    "babel-cli": "^6.26.0",
    "babel-preset-env": "^1.6.1",
    "babel-preset-react": "^6.24.1",
    "babel-preset-stage-0": "^6.24.1",
    "proton-native": "^1.0.17"
  }
}
Originally created by @davidsylvestre on GitHub (Apr 4, 2018). Original GitHub issue: https://github.com/kusti8/proton-native/issues/79 Hi. (Sorry for the glitches in English, I had to use the translator) By performing the quick-start of the documentation, I came across the error below. ```sh >npm run start > teste-proton@0.0.1 start c:\backup\projetos\javascript\teste-proton > babel-node index.js module.js:540 throw err; ^ Error: Cannot find module 'yoga-layout' at Function.Module._resolveFilename (module.js:538:15) at Function.Module._load (module.js:468:25) at Module.require (module.js:587:17) at require (internal/module.js:11:18) at Object.<anonymous> (c:\backup\projetos\javascript\teste-proton\node_modules\proton-native\bin\components\View.js:23:19) at Module._compile (module.js:643:30) at Module._extensions..js (module.js:654:10) at Object.require.extensions.(anonymous function) [as .js] (c:\backup\projetos\javascript\teste-proton\node_modules\babel-register\lib\node.js:152:7) at Module.load (module.js:556:32) at tryModuleLoad (module.js:499:12) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! teste-proton@0.0.1 start: `babel-node index.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the teste-proton@0.0.1 start 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! C:\Users\david\scoop\persist\nodejs-lts\cache\_logs\2018-04-04T17_28_14_560Z-debug.log ``` ```json { "name": "teste-proton", "version": "0.0.1", "private": true, "scripts": { "start": "node_modules/.bin/babel-node index.js", "build": "node_modules/.bin/babel index.js -d bin/", "package-linux": "bash ./scripts/appimage.sh" }, "dependencies": { "babel-cli": "^6.26.0", "babel-preset-env": "^1.6.1", "babel-preset-react": "^6.24.1", "babel-preset-stage-0": "^6.24.1", "proton-native": "^1.0.17" } } ```
Author
Owner

@parro-it commented on GitHub (Apr 4, 2018):

It seems that version 1.0.17 is published from the yoga branch, that doesn't work because:

  1. it doesn't have the yoga-layout dependency declared on package.json
  2. libui-node and libui version declared there does not still support necessary controls to use yoga.

It's probably a mistaken publish, should be easily corrected with a patch on npm

<!-- gh-comment-id:378694668 --> @parro-it commented on GitHub (Apr 4, 2018): It seems that version 1.0.17 is published from the yoga branch, that doesn't work because: 1) it doesn't have the yoga-layout dependency declared on package.json 2) libui-node and libui version declared there does not still support necessary controls to use yoga. It's probably a mistaken publish, should be easily corrected with a patch on npm
Author
Owner

@kusti8 commented on GitHub (Apr 4, 2018):

Yeah, I published the wrong branch. It's fixed now.

<!-- gh-comment-id:378699625 --> @kusti8 commented on GitHub (Apr 4, 2018): Yeah, I published the wrong branch. It's fixed now.
Author
Owner

@davidsylvestre commented on GitHub (Apr 4, 2018):

I modified it to use version 1.0.16 and it worked.
Thanks

<!-- gh-comment-id:378706354 --> @davidsylvestre commented on GitHub (Apr 4, 2018): I modified it to use version 1.0.16 and it worked. Thanks
Author
Owner

@parro-it commented on GitHub (Apr 4, 2018):

You should use latest version, that is now 1.0.18

<!-- gh-comment-id:378712570 --> @parro-it commented on GitHub (Apr 4, 2018): You should use latest version, that is now 1.0.18
Author
Owner

@mischnic commented on GitHub (Apr 4, 2018):

I guess a typo...

<!-- gh-comment-id:378713112 --> @mischnic commented on GitHub (Apr 4, 2018): I guess a typo...
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/proton-native#48
No description provided.