dji-sdk / Cloud-API-Demo-Web

MIT License
87 stars 73 forks source link

Update package-lock.json #28

Closed chldppwls12 closed 1 month ago

chldppwls12 commented 1 month ago

I did npm install to run web demo in docker and the following error occurred.

npm ERR! network request to https://registry.nlark.com/rollup-plugin-external-globals/download/rollup-plugxternal-globals-0.6.1.tgz failed, reason: getaddrinfo ENOTFOUND registry.nlark.com
npm ERR! network This is a problem related to network connectivity.

In package-lock.json, there are some that use registry as nlark.

...
 "node_modules/@nodelib/fs.scandir": {
      "version": "2.1.5",
      "resolved": "https://registry.nlark.com/@nodelib/fs.scandir/download/@nodelib/fs.scandir-2.1.5.tgz",
      "integrity": "sha1-dhnC6yGyVIP20WdUi0z9WnSIw9U=",
      "license": "MIT",
      "dependencies": {
        "@nodelib/fs.stat": "2.0.5",
        "run-parallel": "^1.1.9"
      },
      "engines": {
        "node": ">= 8"
      }
...

Those things cause problems when npm install. Does anyone else have the same issue as me?? If there is a user experiencing the same problem, I think we need to change package-lock.json to solve the issue, what do you think?

I'd appreciate it if you could tell me if I made a mistake. Thanks:)

jacksonazevedo commented 1 month ago

I had the same problem, if you can fix it please let me know

Ezio-Wen commented 1 month ago

Open the file "\cloud_api_sample\source\nginx\front_page\package-lock.json", search for "registry.nlark.com" and replace them all with "registry.npmmirror.com", and execute "./update_front.sh".

chldppwls12 commented 1 month ago

The same problem occurred when I deleted and installed the file to create a new package-lock.json. As above, it seems to work if I just change all those parts in the existing file. Thanks