npm error when running simple application with frontend (can not find cuba-platform-rest-2.1.2.tgz)
lovtsovaik opened this issue · 4 comments
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
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
@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"
}
},
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
@Afanasevaa36 Which generator version are you using?