yocto.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
* Re: [yocto] npmsw fetching error: package from npm-shrinkwrap is not downloaded so "Could not install from.../SONStream" as it does not contain a package.json file.
@ 2020-08-27 13:16 sandra.tobajas
  2020-08-28  9:44 ` Cardenas Jose Antonio (JCARDENA)
  0 siblings, 1 reply; 4+ messages in thread
From: sandra.tobajas @ 2020-08-27 13:16 UTC (permalink / raw)
  To: joseantonio.cardenas; +Cc: yocto

Hi Jose,

It seems that all your dependencies are development dependencies tagged with "dev":true in the npm-shrinkwrap.json file.

If all dependencies are for development purpose and if you want to install the package as a development package, you can add:

npmsw://${THISDIR}/${PN}/npm-shrinkwrap.json;dev=true

It seems that "npmsw.py" fetching code fails if you are trying to install a npm package with a npm-shrinkwrap.json file with no dependencies (as reported by Jean-Marie and Randy). 
I am currently preparing a patch to solve the problem reported here: https://bugzilla.yoctoproject.org/show_bug.cgi?id=13901.

If not, maybe you could send the full npm-shrinkwrap.json file to reproduce exactly the problem.

Regards,

Sandra

Sandra Tobajas
Consultant en logiciel libre | Montréal, Qc
Savoir-Faire Linux
Bureau: (+1) 514-276-5468 # 329

^ permalink raw reply	[flat|nested] 4+ messages in thread
* npmsw fetching error: package from npm-shrinkwrap is not downloaded so "Could not install from.../SONStream" as it does not contain a package.json file.
@ 2020-08-21 19:19 Cardenas Jose Antonio (JCARDENA)
  2020-08-21 20:58 ` [yocto] " Randy MacLeod
  0 siblings, 1 reply; 4+ messages in thread
From: Cardenas Jose Antonio (JCARDENA) @ 2020-08-21 19:19 UTC (permalink / raw)
  To: yocto@yoctoproject.org

[-- Attachment #1: Type: text/plain, Size: 5118 bytes --]

Hi all, following with my work with yocto npm I got a new error.

I have declared in the recipe

SRC_URI = " \
    git://github.com/SiliconLabs/gateway-management-ui.git;protocol=git \
    npmsw://${THISDIR}/${PN}/npm-shrinkwrap.json \
"

And npm-shrinkwrap.json starts with :

{
  "name": "gateway_react_ui",
  "version": "2.5.0",
  "lockfileVersion": 1,
  "requires": true,
  "dependencies": {
    "JSONStream": {
      "version": "1.3.5",
      "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz",
      "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==",
      "dev": true,
      "requires": {
        "jsonparse": "^1.2.0",
        "through": ">=2.2.7 <3"
      }
    },
    "accepts": {
      "version": "1.3.7",
      "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
      "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
      "dev": true,
      "requires": {
        "mime-types": "~2.1.24",
        "negotiator": "0.6.2"
      }
    },
    "accord": {
      "version": "0.29.0",
      "resolved": "https://registry.npmjs.org/accord/-/accord-0.29.0.tgz",
      "integrity": "sha512-3OOR92FTc2p5/EcOzPcXp+Cbo+3C15nV9RXHlOUBCBpHhcB+0frbSNR9ehED/o7sTcyGVtqGJpguToEdlXhD0w==",
      "dev": true,
      "requires": {
        "convert-source-map": "^1.5.0",
        "glob": "^7.0.5",
        "indx": "^0.2.3",
        "lodash.clone": "^4.3.2",
        "lodash.defaults": "^4.0.1",
        "lodash.flatten": "^4.2.0",
        "lodash.merge": "^4.4.0",
        "lodash.partialright": "^4.1.4",
        "lodash.pick": "^4.2.1",
        "lodash.uniq": "^4.3.0",
        "resolve": "^1.5.0",
        "semver": "^5.3.0",
        "uglify-js": "^2.8.22",
        "when": "^3.7.8"
      },

It seems that JSONStream dependency downloading step is ignored silently in do_fetch task so I get this error in do_configure task because it doesn't find the files:


npm ERR! code ENOLOCAL
npm ERR! Could not install from "../../home/bob/develop/yocto/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/zigbee-ui-reactui/2.5.0-r0/git/reactui/node_modules/JSONStream" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/bob/develop/yocto/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/zigbee-ui-reactui/2.5.0-r0/npm-cache/_logs/2020-08-21T19_06_36_633Z-debug.log


ERROR: Logfile of failure stored in: /home/bob/develop/yocto/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/zigbee-ui-reactui/2.5.0-r0/temp/log.do_configure.6983
ERROR: Task (/home/bob/develop/yocto/meta-niko/recipes-miscellaneous/zigbee/zigbee-ui-reactui.bb:do_configure) failed with exit code '1'

I attach the log:

$ cat /home/bob/develop/yocto/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/zigbee-ui-reactui/2.5.0-r0/npm-cache/_logs/2020-08-21T19_06_36_633Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/home/bob/develop/yocto/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/zigbee-ui-reactui/2.5.0-r0/recipe-sysroot-native/usr/bin/node',
1 verbose cli   '/home/bob/develop/yocto/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/zigbee-ui-reactui/2.5.0-r0/recipe-sysroot-native/usr/bin/npm',
1 verbose cli   'pack',
1 verbose cli   '/home/bob/develop/yocto/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/zigbee-ui-reactui/2.5.0-r0/git/reactui/node_modules/JSONStream'
1 verbose cli ]
2 info using npm@6.13.4
3 info using node@v12.14.1
4 verbose npm-session 8672504930c3cab4
5 silly fetchPackageMetaData error for /home/bob/develop/yocto/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/zigbee-ui-reactui/2.5.0-r0/git/reactui/node_modules/JSONStream Could not install from "../../home/bob/develop/yocto/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/zigbee-ui-reactui/2.5.0-r0/git/reactui/node_modules/JSONStream" as it does not contain a package.json file.
6 verbose stack Error: ENOENT: no such file or directory, open '/home/bob/develop/yocto/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/zigbee-ui-reactui/2.5.0-r0/git/reactui/node_modules/JSONStream/package.json'
7 verbose cwd /tmp/tmptuei7c_m
8 verbose Linux 5.4.0-42-generic
9 verbose argv "/home/bob/develop/yocto/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/zigbee-ui-reactui/2.5.0-r0/recipe-sysroot-native/usr/bin/node" "/home/bob/develop/yocto/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/zigbee-ui-reactui/2.5.0-r0/recipe-sysroot-native/usr/bin/npm" "pack" "/home/bob/develop/yocto/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/zigbee-ui-reactui/2.5.0-r0/git/reactui/node_modules/JSONStream"
10 verbose node v12.14.1
11 verbose npm  v6.13.4
12 error code ENOLOCAL
13 error Could not install from "../../home/bob/develop/yocto/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/zigbee-ui-reactui/2.5.0-r0/git/reactui/node_modules/JSONStream" as it does not contain a package.json file.
14 verbose exit [ 1, true ]

Regards

Jose

[-- Attachment #2: Type: text/html, Size: 14469 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-08-28 15:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-27 13:16 [yocto] npmsw fetching error: package from npm-shrinkwrap is not downloaded so "Could not install from.../SONStream" as it does not contain a package.json file sandra.tobajas
2020-08-28  9:44 ` Cardenas Jose Antonio (JCARDENA)
2020-08-28 15:19   ` Sandra Tobajas
  -- strict thread matches above, loose matches on Subject: below --
2020-08-21 19:19 Cardenas Jose Antonio (JCARDENA)
2020-08-21 20:58 ` [yocto] " Randy MacLeod

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).