Azure-Samples / azure-digital-twins-unreal-integration

Sample project demonstrating the Unreal Engine plug-in for Azure Digital Twins
https://www.unrealengine.com/marketplace/en-US/product/adtlink-for-unreal-engine
MIT License
93 stars 44 forks source link

Mock Devices Build failed with error code: 1 #17

Open vararth opened 1 year ago

vararth commented 1 year ago

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

After completing the instructions on this page -https://github.com/Azure-Samples/azure-digital-twins-unreal-integration/blob/main/docs/adt-link-plugin-ue.md I was following instructions on this page - https://github.com/Azure-Samples/azure-digital-twins-unreal-integration/blob/main/docs/simulate-iot-devices.md

Since the "&&" command did not work, I changed the lines in this manner - npm ci && npm run build -----> (npm ci) -and (npm run build)

Followd the "Advanced, troubleshooting, Pre-Reqs and build issues" approach and got another error log after - npm ci

Any log messages given by the failure

Log files attached 2022-11-24T11_00_43_412Z-debug-0.log 2022-11-24T11_00_43_740Z-debug-0.log

Expected/desired behavior

Mock Devices to get set up

OS and Version?

Windows 11

Versions

Current

vararth commented 1 year ago

@adamlash @microsoftopensource @stevebus @459680 @marvin-garcia Please help, I need to see the mock devices data but the app isn't getting built..

digitaltriplets commented 1 year ago

Hi! I'll second that.

Im also running into error code 1 when trying to open mocksensors.

i think the origin of the bug is the code not being up to date with nodejs. (im running nodejs v18.12.0.) im not a programer by trade so im infinitely appreciative for all the help in this.

I'm adding my error text in case its of any use.

best regards DT error text.txt

vararth commented 1 year ago

@digitaltriplets @adamlash

Turns out, for me there were multiple issues, firstly I was missing Python, then I had to add Python to "PATH" - I think it is an environment variable (though as a non-programmer myself, I don't really know what that means).

Then I had to update and add a lot of C++ libraries from the Visual Studio Installer.

Finally had to install NodeJS 16.13.0 (I had also originally installed 18.12.0) and then the mock devices started working.

I think the devs should update the documentation for noobs like me who don't know what dependencies and other packages are to be installed in addition to what is already mentioned!

The ADT Link is finally working for me now though, so I guess with a bit of effort, this repo does work decently enough :)

digitaltriplets commented 1 year ago

@vararth @adamlash I'm currently running python V.3.10.0 and I fixed the PATH so I'm no longer getting that error when looking for the python executable. My question is should I use a older version of Python since it seems to ask for Python V.2. And what C++ libraries did you add? I'm still getting error codes where its looking for folders not on the github page (for example node_modules).

regards DT

vararth commented 1 year ago

@digitaltriplets

So I installed "Visual Studio Build Tools 2017" and in the installer, I chose the following options -

  1. Under "Windows" -

    Visual C++ build tools .NET desktop build tools

  2. Under "Web & Cloud"-

    Azure development build tools

  3. Under "Uncategorized" -

    Node.js build tools

With regards the python issue, I installed both python 2 and python 3, but vertically inside the path list, I moved python2 above python3 - seems to have solved the issue for me, check the screenshots below :)

Build Tools req

image

SYL5683 commented 1 year ago

Python 2 is mandatory

kofiasare266 commented 1 year ago

@digitaltriplets @adamlash

Turns out, for me there were multiple issues, firstly I was missing Python, then I had to add Python to "PATH" - I think it is an environment variable (though as a non-programmer myself, I don't really know what that means).

Then I had to update and add a lot of C++ libraries from the Visual Studio Installer.

Finally had to install NodeJS 16.13.0 (I had also originally installed 18.12.0) and then the mock devices started working.

I think the devs should update the documentation for noobs like me who don't know what dependencies and other packages are to be installed in addition to what is already mentioned!

The ADT Link is finally working for me now though, so I guess with a bit of effort, this repo does work decently enough :)

Hi Varath, I am facing the same issue here. Do you mind breaking the process you followed down to resolve it further.

I have installed NodeJS 16.13.0 and the Visual Studio Build Tools 2017. I still get Error Code 1 when I run the npm ci.

kofiasare266 commented 1 year ago

I got it fixed. I had to edit the path variable as the final fix. Python 2 is required.