AR.js icon indicating copy to clipboard operation
AR.js copied to clipboard

Unable to build locally - remove package-lock.json

Open Nauzer opened this issue 3 years ago • 1 comments

Do you want to request a feature or report a bug? Bug

What is the current behavior? If you try to clone repo and run locally you get the following (or similar) error:

npm ERR! code ENOLOCAL
npm ERR! Could not install from "node_modules/aframe/node_modules/three-bmfont-text/three-buffer-vertex-data@dmarcos/three-buffer-vertex-data#69378fc58daf27d3b1d930df9f233473e4a4818c" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/marknaus/.npm/_logs/2022-09-16T07_47_45_075Z-debug.log

If the current behavior is a bug, please provide the steps to reproduce. Clone repo locally Run npm install An earlier try go stuck on 'debug@github:ngokevin/debug#noTimestamp' which is mentioned in the package-lock.json.

Please mention other relevant information such as the browser version, Operating System and Device Name Mac OS 12.0.1 - M1 Pro Macbook Pro 16-inch 32gb RAM

What is the expected behavior? Running npm install allows me to build locally.

If this is a feature request, what is motivation or use case for changing the behavior? N/A

Suggested Resolution Remove package-lock.json from repo After removing it locally I can run npm install just fine. Can make a PR if desired.

Nauzer avatar Sep 16 '22 07:09 Nauzer

Hi @Nauzer thanks for reporting this. It could be that you are using a different node version , but probably this is not the problem. Can you tell us which node and npm version you are using? We use node version 14.19 as stated in .nvmrc file https://github.com/AR-js-org/AR.js/blob/0722816b2afaf327186e40e38e1de454a3f5d434/.nvmrc#L1 You could try to use the same node version running nvm install 14 and nvm use 14. But probably this error is caused by other reason, read this article https://stackoverflow.com/questions/48143945/what-is-the-err-code-enolocal-npm-err-could-not-install-because-of-an-error The package-lock.json is also used by the github action to perform code checking, and enable automatic dependency alert, so in turn we don't want to remove it.

kalwalt avatar Sep 20 '22 18:09 kalwalt