Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm error when running simple application with frontend (can not find cuba-platform-rest-2.1.2.tgz) #474

Open
lovtsovaik opened this issue Mar 25, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@lovtsovaik
Copy link

Environment:
CUBA Platform version: 7.2.18
CUBA Studio plugin version: 15.9-213
IntelliJ version: IntelliJ IDEA 2021.3.3 (Community Edition)

Steps

  • Open project untitled1.zip
    Or create new project, add front module
  • Run project

AR: Application doesn't start

npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\lovtsovaik\IdeaProjects\release15.9\untitled1\modules\packages\cuba-rest-js\cuba-platform-rest-2.1.2.tgz
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\lovtsovaik\IdeaProjects\release15.9\untitled1\modules\packages\cuba-rest-js\cuba-platform-rest-2.1.2.tgz'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\lovtsovaik\AppData\Local\npm-cache\_logs\2022-03-25T12_30_28_694Z-debug.log

> Task :app-front:npmInstall FAILED

Execution failed for task ':app-front:npmInstall'.
> Process 'command 'npm.cmd'' finished with non-zero exit value -4058
@lovtsovaik lovtsovaik added the bug Something isn't working label Mar 25, 2022
HegelPro added a commit that referenced this issue Mar 25, 2022
affects: @cuba-platform/front-generator
@HegelPro
Copy link
Contributor

The reason of the problem was generating package-lock with paths to locale tarballs in app template.

Algarithm how we need to update package-lock:
https://github.com/Amplicode/amplicode-frontend/issues/226#issuecomment-1070523455

@vyacheslav-pushkin
Copy link
Collaborator

@HegelPro Please fix the package-lock in template. It seems that it contains integrity hashes of locally built libraries. They are different from the ones in registry and it causes this problem.

    "node_modules/@cuba-platform/rest": {
      "version": "2.1.2",
      "resolved": "file:../packages/cuba-rest-js/cuba-platform-rest-2.1.2.tgz",
      "integrity": "sha512-kj3z3qhNlDy/D2HtzTFs20rdZhkpS6NgX171EqpVeVh4+rqCfTZq661mhbOEJA5ueyuElEQU4xr51rnM277qeQ==",
      "license": "Apache-2.0",
      "engines": {
        "node": ">=12"
      }
    },

HegelPro added a commit that referenced this issue Mar 29, 2022
affects: @cuba-platform/front-generator
HegelPro added a commit that referenced this issue Mar 29, 2022
affects: @cuba-platform/front-generator
vyacheslav-pushkin pushed a commit that referenced this issue Apr 1, 2022
affects: @cuba-platform/front-generator
@lovtsovaik lovtsovaik assigned Afanasevaa36 and unassigned lovtsovaik Apr 6, 2022
@Afanasevaa36
Copy link

CUBA Platform version: 7.2.19
CUBA Studio plugin version: 15.0.SNAPSHOT2762-213
IntelliJ version: IntelliJ IDEA 2021.3.3 (Ultimate Edition)

npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\AndreyAfanasev\Downloads\untitled1\modules\packages\cuba-rest-js\cuba-platform-rest-2.1.2.tgz
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\AndreyAfanasev\Downloads\untitled1\modules\packages\cuba-rest-js\cuba-platform-rest-2.1.2.tgz'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\AndreyAfanasev\AppData\Local\npm-cache\_logs\2022-04-06T11_45_51_865Z-debug.log

Process finished with exit code -4058

@vyacheslav-pushkin
Copy link
Collaborator

@Afanasevaa36 Which generator version are you using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants