ELOCKVERIFY error by NPM wirh Chakra Theme

If I run npm install, I get the followin message:

found 2 moderate severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

npm audit:

npm ERR! code ELOCKVERIFY
npm ERR! Errors were found in your package-lock.json, run  npm install  to fix them.
npm ERR!     Invalid: lock file's [email protected]:https:/registry.npmjs.org/frontity-chakra-theme/-/frontity-chakra-theme-0.0.2.tgz does not satisfy [email protected]/packages/frontity-chakra-theme

npm ERR! A complete log of this run can be found in:
npm ERR!    home/myname/.npm/_logs/2020-03-09T08_50_55_789Z-debug.log

2020-03-09T08_50_55_789Z-debug.log:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node',
1 verbose cli   '/home/myname/.npm_modules/bin/npm',
1 verbose cli   'audit',
1 verbose cli   'fix' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session aab6f337da100aa6
5 verbose stack Error: Errors were found in your package-lock.json, run  npm install  to fix them.
5 verbose stack     Invalid: lock file's [email protected]:https:/registry.npmjs.org/frontity-chakra-theme/-/frontity-chakra-theme-0.0.2.tgz does not satisfy [email protected]/packages/frontity-chakra-theme
5 verbose stack     at lockVerify.then (/home/myname/.npm_modules/lib/node_modules/npm/lib/audit.js:184:19)
6 verbose cwd /home/myname/web/szinhaz.online/szinhaz
7 verbose Linux 5.3.0-40-generic
8 verbose argv "/usr/bin/node" "/home/myname/.npm_modules/bin/npm" "audit" "fix"
9 verbose node v10.19.0
10 verbose npm  v6.14.2
11 error code ELOCKVERIFY
12 error Errors were found in your package-lock.json, run  npm install  to fix them.
12 error     Invalid: lock file's [email protected]:https:/registry.npmjs.org/frontity-chakra-theme/-/frontity-chakra-theme-0.0.2.tgz does not satisfy [email protected]/packages/frontity-chakra-theme
13 verbose exit [ 1, true ]

npx frontity info:

System:

  • OS: Linux 5.3 Linux Mint 19.3 (Tricia)
  • CPU: (8) x64 Intel® Core™ i7-4810MQ CPU @ 2.80GHz
  • Memory: 7.18 GB / 15.54 GB
  • Shell: 4.4.20 - /bin/bash

Binaries:

  • Node: 10.19.0 - /usr/bin/node
  • npm: 6.14.2 - ~/.npm_modules/bin/npm

Browsers:

  • Chrome: 80.0.3987.132
  • Firefox: 73.0.1

npmPackages:

  • @frontity/core: ^1.5.0 => 1.5.0
  • @frontity/head-tags: ^1.0.1 => 1.0.1
  • @frontity/html2react: ^1.3.0 => 1.3.0
  • @frontity/tiny-router: ^1.1.0 => 1.1.0
  • @frontity/wp-source: ^1.6.0 => 1.6.0
  • frontity: ^1.5.2 => 1.5.2
  • frontity-chakra-theme: ./packages/frontity-chakra-theme => 0.0.2
  • react-facebook: ^8.1.4 => 8.1.4
  • react-ga: ^2.7.0 => 2.7.0
  • react-swipeable: ^5.5.1 => 5.5.1

npmGlobalPackages:

  • frontity: Not Found
  • npx: Not Found

My hole project can be found here.

Hi @koli14! :wave:

The error occurs when running npm audit, right?

I took a look at your code and it seems the problem is in /packages/frontity-chakra-theme/package.json. For some reason that file has properties that should not be there (did you copy the package from node_modules?). If you remove all the properties that start with the _ character and run npm i then you will be able to run npm audit in your project.

By the way, you can run npx frontity create --theme frontity-chakra-theme to create a project with that specific theme package (you can choose a different package name, of course).

Cheers!

Thanks, now it’s working! I still have one question. Whats is the expected behavior: should the node modules of the local package be in the root node_modules directory, or in the packages/my_local_package/node_modules directory?

In a Frontity project all the dependencies should be in the root node_modules directory.

Actually, local packages are handled like any external npm package, if you go to node_modules you will see them “installed” there (as a symbolic link pointing to the package’s folder), along with all the other depedencies.