Hello, new to this forum. I am Wouter from -ommited company-
In preparation of our development project with you, I am setting up a custom deployment to get more in depth knowledge. I have extensively read the wiki to get started and with a lot of trial and error from learning to work with the tools, I finally got the custom project to run.
However, the npm serve command still fails.
npm ERR! 404 Not found - GET https://registry.npmjs.org/orutil - Not found
npm ERR! 404 âorutil@*â is not in this registry.
When I run ./gradlew modelWatch as suggested in another topic, it fails at:
âopenremote:ui:component:rest:npmBuildâ
Process 'command âyarnâ â finished with non-zero exit value 1
I have ran the required yarn commands multiple times and tried different versions without success.
Good afternoon, happy to have you in the OpenRemote forum!
Usually when you run that gradle command, you should be able to view a detailed error message outlining exactly what failed. I have had this problem before and it could happen for a variety of reasons. The error you sent means that the yarn command failed (non-zero exit value of 1).
Please send over that detailed error message, so that we can figure out whatâs going wrong!
Task :openremote:ui:component:rest:npmBuild
src/restclient.ts(5,24): error TS2307: Cannot find module â@openremote/modelâ or its corresponding type declarations.
src/restclient.ts(1203,19): error TS2307: Cannot find module âaxiosâ or its corresponding type declarations.
src/restclient.ts(1204,24): error TS2307: Cannot find module âaxiosâ or its corresponding type declarations.
src/restclient.ts(1206,16): error TS2664: Invalid module name in augmentation, module âaxiosâ cannot be found.
src/restclient.ts(1238,35): error TS7006: Parameter âaxiosResponseâ implicitly has an âanyâ type.
src/index.ts(1,90): error TS2307: Cannot find module âaxiosâ or its corresponding type declarations.
src/index.ts(3,16): error TS2307: Cannot find module âqsâ or its corresponding type declarations.
src/index.ts(21,55): error TS7006: Parameter âconfigâ implicitly has an âanyâ type.
src/index.ts(22,40): error TS7006: Parameter âparamsâ implicitly has an âanyâ type.
What went wrong:
Execution failed for task â:openremote:ui:component:rest:npmBuildâ.
Process âcommand âyarnââ finished with non-zero exit value 1
./gradlew clean installDist returns the following:
Task :ui:app:custom:npmClean FAILED
Usage Error: The nearest package directory (/home/wouter/custom-project-OR/ui/app/custom) doesnât seem to be part of the project declared in /home/wouter/custom-project-OR.
If /home/wouter/custom-project-OR isnât intended to be a project, remove any yarn.lock and/or package.json file there.
If /home/wouter/custom-project-OR is intended to be a project, it might be that you forgot to list ui/app/custom in its workspace configuration.
Finally, if /home/wouter/custom-project-OR is fine and you intend ui/app/custom to be treated as a completely separate project (not even a workspace), create an empty yarn.lock file in i
t.
$ yarn run [âinspect] [âinspect-brk] [-T,âtop-level] [-B,âbinaries-only] [ârequire #0] âŚ
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task â:ui:app:custom:npmCleanâ.
Process âcommand âyarnââ finished with non-zero exit value 1
All settings on the page you mention are correct.
I am under the impression that the problem lies within the name of the root folder, because my github project is called custom-project-OR and is pulled as such for the name of the root folder, but the project structure shows a structure within folder custom-project. All newly generated folders by the build also get excluded from the project.
I have now renamed the root folder and will try again. Will take a while because indexing took 2 days last time
Looks like an issue with the following command (which is automatically run by many gradle tasks):
yarn install
Can you please run this from your custom project directory and report back the output please (can also try replacing the yarn.lock with the one from the openremote submodule directory as these sometimes get out of sync and possibly we need to update the yarn.lock in the custom project.
yarn install did give an error before indeed.
However I have now recloned the repo while changing the name back to custom-project and everything runs fine now. Not sure if it is just the fresh clone that did the job or if there is a fixed reference somewhere to the main folder name?