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

problem setting up on Windows #1196

Closed
granel2 opened this issue Aug 19, 2023 · 134 comments
Closed

problem setting up on Windows #1196

granel2 opened this issue Aug 19, 2023 · 134 comments

Comments

@granel2
Copy link

granel2 commented Aug 19, 2023

(Text moved here from #574)

installing Moddable SDK on win11 64 - using webpage manual -- C:\Program Files\Microsoft Visual Studio\2022\Community>xsbug
'xsbug' is not recognized as an internal or external command,
operable program or batch file.
it received in my x86 native tools comm.promt vs2022
further setup - installation fails when using step-by-step instructions
need help

@phoddie phoddie changed the title granel problem setting up on Windows Aug 20, 2023
@phoddie
Copy link
Collaborator

phoddie commented Aug 20, 2023

Welcome.

A great alternative to the manual set-up is to use xs-dev. It is a tool that takes automates the installation and set-up on the Moddable SDK. If you have npm installed, here's all you have to do:

npm install -g xs-dev
xs-dev setup

Good luck!

@NW-Lab
Copy link
Contributor

NW-Lab commented Aug 20, 2023

Does the xsbug.exe file exist in the %MODDABLE%\build\bin\win\release folder?
If so, is the environment variable (path) set? (Launch the Windows terminal after setting it. Do not use a new tab.)

@granel2
Copy link
Author

granel2 commented Aug 20, 2023

but I read in the manual xs-dev -- this installation option does not work with Windows, but I started with it, the macbook is waiting) - if I do the installation with the xs-dev option, I need to clean the computer from what I tried with manual installation == from a clean leaf?

@granel2
Copy link
Author

granel2 commented Aug 20, 2023

about : Does the xsbug.exe file exist in the %MODDABLE%\build\bin\win\release folder?
in build folder have only folders:
device; makefile; simulators
(((

@granel2
Copy link
Author

granel2 commented Aug 20, 2023

I did the installation on Windows 11-64 strictly according to the instructions for manual installation - I never managed to create a folders bin\release - have only C:\Users\admin\Projects\moddable\build\ inside 3 other folders: device + makefile + simulators

@granel2
Copy link
Author

granel2 commented Aug 20, 2023

installation attempts with xs-dev end up with this message when trying to run a test project:

C:\Users\admin\Projects\moddable>xs-dev run --example helloworld
Moddable tooling required. Run 'xs-dev setup --device win' before trying again.

I install this:

C:\Program Files\Microsoft Visual Studio\2022\Community>xs-dev setup --device win
Setting up Windows tools at C:\Users\admin\Projects\moddable
......................
.....................
The Moddable Command Prompt will now open for you in a new Window. Please close this Command Prompt and use the Moddable Command Prompt instead.
As a next step, try running the "helloworld example" in the Moddable Command Prompt: xs-dev run --example helloworld'
Opening the Moddable Command Prompt in a new Window

bud all bad((

@granel2
Copy link
Author

granel2 commented Aug 20, 2023

my attempts for 3 days to install and start working with moddable sdk + esp and start learning java script - are not successful, probably I need to return to my favorite C language and development tools - too much time wasted just to install the environment on Win11 and MacOS . The tips found for installation on the Internet are in the nature of a secret society of gurus)))

@phoddie
Copy link
Collaborator

phoddie commented Aug 20, 2023

Sorry that you weren't able to get things working and the frustration it caused. I think both @NextWorldLab and I have been guessing about how to help you, because there haven't been many details in the reports here beyond "does not work."

@HipsterBrown has been very successful helping developers through any problems using xs-dev. If you do decide to try again, I expect he would be able to suggest some ideas for tracking down what is going wrong on your setup.

@phoddie phoddie closed this as completed Aug 20, 2023
@granel2
Copy link
Author

granel2 commented Aug 20, 2023

@HipsterBrown xs-dev + my frend - (working with js - writing servers software) help me instal node.js on my macbook (gave me commands that were not on the Internet) -- but what to do next? install moddableSDK? how to do examples code on my pc? how dounload to esp-esp32-pico-...? I really need step-by-step instructions for the first test project - if it succeeds, then everything will be clear

@granel2
Copy link
Author

granel2 commented Aug 20, 2023

need or no install xcode? when install esp sdk?

@granel2
Copy link
Author

granel2 commented Aug 20, 2023

for a start, you need minimal help - in simple words it will explain what and in what sequence to install (maybe - where to find it)
have macos 11.7.9 -- for xcode 14 need >ios13 (((

@granel2
Copy link
Author

granel2 commented Aug 21, 2023

ones more try install moddable win11:

C:\Users\admin\Projects\examples\ch1-gettingstarted\host>mcconfig -d -m -p esp
'mcconfig' is not recognized as an internal or external command,
operable program or batch file.

where is and how install -- mcconfig
??

@granel2
Copy link
Author

granel2 commented Aug 21, 2023

can see:

C:\Users\admin\Projects\moddable\tools\mcconfig

@HipsterBrown
Copy link
Contributor

@granel2 have you read through the starting guide on the xs-dev docs? https://xs-dev.js.org/guide/00-prepare/

This walks through the initial system requirements, how to install the CLI, and how to start using it.

@granel2
Copy link
Author

granel2 commented Aug 21, 2023

I made a new attempt at a standard installation on Windows 11 - I went as far as creating an example and failed again. Now I'll try a fresh installation of Win11 from your link.

@granel2
Copy link
Author

granel2 commented Aug 21, 2023

√ Moddable SDK successfully set up!
it's with xs-dev win11

@granel2
Copy link
Author

granel2 commented Aug 21, 2023

C:\Users\admin\Projects\moddable>xs-dev run --example helloworld
Moddable tooling required. Run 'xs-dev setup --device win' before trying again.
//installing win

C:\Users\admin\Projects\moddable>xs-dev setup --device win
Setting up Windows tools at C:\Users\admin\Projects\moddable
i Moddable repo already installed
√ Creating Moddable SDK Environment Batch File
√ Creating Moddable Command Prompt Shortcut
√ Installing xsbug-log dependencies
√ Moddable SDK successfully set up!
A shortcut to the Moddable Command Prompt has been created at C:\Users\admin\xs-dev\Moddable Command Prompt.lnk.
You should always use the Moddable Command Prompt when working with the Moddable SDK.
The Moddable Command Prompt will now open for you in a new Window. Please close this Command Prompt and use the Moddable Command Prompt instead.
As a next step, try running the "helloworld example" in the Moddable Command Prompt: xs-dev run --example helloworld'
Opening the Moddable Command Prompt in a new Window

but in new window same :

C:\Users\admin\Projects\moddable>xs-dev run --example helloworld
Moddable tooling required. Run 'xs-dev setup --device win' before trying again.

@granel2
Copy link
Author

granel2 commented Aug 21, 2023

I stopped at this and on the previous installation attempt

@granel2
Copy link
Author

granel2 commented Aug 21, 2023

one step left before my victory

@phoddie
Copy link
Collaborator

phoddie commented Aug 21, 2023

Thank you for trying again and posting the details from the run of xs-dev. It looks like, for some reason, xs-dev doesn't see the installed files in the new window. Let's see if @HipsterBrown has any suggestions for how to investigate what is going on.

@granel2
Copy link
Author

granel2 commented Aug 21, 2023

ok, try now

@granel2
Copy link
Author

granel2 commented Aug 21, 2023

I can't solve the problem myself((((

C:\Users\admin\Projects\moddable>xs-dev run --example helloworld
Moddable tooling required. Run 'xs-dev setup --device win' before trying again.

@phoddie
Copy link
Collaborator

phoddie commented Aug 21, 2023

Yes, I understand. Please wait a little to see if we can get you a suggestion to try. Thank you.

@granel2
Copy link
Author

granel2 commented Aug 21, 2023

ok))))))))))))

@andycarle
Copy link
Member

Could you please post a screenshot of the Command Prompt window where you're running mcconfig? My guess is that you are not using the Moddable Command Prompt that is installed by xs-dev.

@granel2
Copy link
Author

granel2 commented Aug 21, 2023

2023-08-21_20-17-51

@granel2
Copy link
Author

granel2 commented Aug 21, 2023

I tried to run in different terminals, even Power Shell)

@andycarle
Copy link
Member

Interesting. I haven't tried running xs-dev in an Administrator Command Prompt before, but I don't see any obvious reason that should be a problem.

Could you share the output of the env command? I'm just wondering if the Moddable Command prompt batch file is successfully setting up the environment.

@NW-Lab
Copy link
Contributor

NW-Lab commented Aug 23, 2023

moddale path not set?

@granel2
Copy link
Author

granel2 commented Aug 23, 2023

no ((
but can see 'helloword' in debug
2023-08-23_13-19-24

@granel2
Copy link
Author

granel2 commented Aug 23, 2023

can not find xsbug.exe

@NW-Lab
Copy link
Contributor

NW-Lab commented Aug 23, 2023

Did you get any errors during build?

@granel2
Copy link
Author

granel2 commented Aug 23, 2023

no, all was ok

@granel2
Copy link
Author

granel2 commented Aug 23, 2023

assembly of the working environment is absolutely manual and requires attention, there are many obscure dependencies, returning the state of the computer at the time of the start of the experiment to install the environment is also not an easy task. Do you really have an environment deployed on Win10 - 11 and you create projects in Java Script?

@granel2
Copy link
Author

granel2 commented Aug 23, 2023

C:\Users\admin\xs-dev\moddable
ones more check -- not found xsbug.exe

@NW-Lab
Copy link
Contributor

NW-Lab commented Aug 23, 2023

image

@granel2
Copy link
Author

granel2 commented Aug 23, 2023

after installing the XS-DEV components in automatic mode, the PC simulator immediately began to work for me, but then I installed all the components for microcontrollers manually, using the manual:
https://www.moddable.com/documentation/Moddable%20SDK%20-%20Getting%20Started#win-instructions
Moddable SDK – Getting Started

@granel2
Copy link
Author

granel2 commented Aug 23, 2023

I saw this program before)))) now she ran away from me)))))

@granel2
Copy link
Author

granel2 commented Aug 23, 2023

need clean all an reinstall (((
but need step by step for 4-th attempt

@granel2
Copy link
Author

granel2 commented Aug 23, 2023

main and first -- clean all in env.variables in PC -- yes?

@NW-Lab
Copy link
Contributor

NW-Lab commented Aug 23, 2023

Just in case, can you try resetting the environment variables?

@granel2
Copy link
Author

granel2 commented Aug 23, 2023

yes, now

@granel2
Copy link
Author

granel2 commented Aug 23, 2023

before

after

@granel2
Copy link
Author

granel2 commented Aug 23, 2023

after that:

2023-08-23_14-14-48

@NW-Lab
Copy link
Contributor

NW-Lab commented Aug 23, 2023

why path is debug? Is it a release mistake?

@granel2
Copy link
Author

granel2 commented Aug 23, 2023

it's my -- need release?

@granel2
Copy link
Author

granel2 commented Aug 23, 2023

2023-08-23_14-31-50

@granel2
Copy link
Author

granel2 commented Aug 24, 2023

installed a virtual machine + Windows 10 -64.
question: what to install first, in what order?
xs-dev --> moddable --> python2.7 --> esp sdk ??

@granel2
Copy link
Author

granel2 commented Aug 24, 2023

in vmWare win10-64 -- I think all ok
but can not download program to my esp8266:

C:\Users\admin\xs-dev\moddable>xs-dev run --example helloworld --device esp\nodemcu
The current environment does not appear to be set up for the ESP8266 build target. Please run xs-dev setup --device esp8266 before trying again.

C:\Users\admin\xs-dev\moddable>xs-dev setup --device esp8266
i Ensuring esp8266 directory
√ Downloading xtensa toolchain
√ Downloading arduino core tooling
√ Cloning esp8266 RTOS SDK repo
√ Downloading ESP Tool
√ Downloading Cygwin toolchain support package
√ Setting environment variables
Python is required.
You can download and install Python from python.org/downloads
Or xs-dev can manage installing Python and other dependencies using the Windows Package Manager Client (winget).
You can install winget via the App Installer package in the Microsoft Store.
Please install either Python or winget, then launch a new Command Prompt and re-run this setup.

C:\Users\admin\xs-dev\moddable>xs-dev run --example helloworld --device esp\esp8266
The current environment does not appear to be set up for the ESP8266 build target. Please run xs-dev setup --device esp8266 before trying again.

C:\Users\admin\xs-dev\moddable>xs-dev run --example helloworld --device esp\nodemcu
The current environment does not appear to be set up for the ESP8266 build target. Please run xs-dev setup --device esp8266 before trying again.

C:\Users\admin\xs-dev\moddable>

@granel2
Copy link
Author

granel2 commented Aug 24, 2023

Capture

@granel2
Copy link
Author

granel2 commented Aug 24, 2023

need Python? which version? full or tool?

@granel2
Copy link
Author

granel2 commented Aug 24, 2023

install 'winget' + python
long time wait 'installing python from winget'
dont understand(( maybe restart pc?

@granel2
Copy link
Author

granel2 commented Aug 24, 2023

Capture2

@granel2
Copy link
Author

granel2 commented Aug 24, 2023

C:\Users\admin\xs-dev\moddable>xs-dev run --example helloworld --device esp8266
The current environment does not appear to be set up for the ESP8266 build target. Please run xs-dev setup --device esp8266 before trying again.

C:\Users\admin\xs-dev\moddable>xs-dev run --example helloworld --device esp8266 --port COM3
The current environment does not appear to be set up for the ESP8266 build target. Please run xs-dev setup --device esp8266 before trying again.

===========================
all install good, but can not download to esp8266((
can you help me?))

@granel2
Copy link
Author

granel2 commented Aug 25, 2023

I try add esp32, reseive next errors:

** Visual Studio 2022 Developer Command Prompt v17.7.2
** Copyright (c) 2022 Microsoft Corporation


[vcvarsall.bat] Environment initialized for: 'x86'
Setting PYTHONNOUSERSITE, was not set
Using Python in C:\Users\admin\xs-dev\esp32\esp-idf
'null' is not recognized as an internal or external command,
operable program or batch file.
Using Git in C:\Espressif\tools\idf-git\2.34.2\cmd
git version 2.34.1.windows.1
Setting IDF_PATH: C:\Users\admin\xs-dev\esp32\esp-idf

Adding ESP-IDF tools to PATH...
ERROR: tool xtensa-esp32-elf has no installed versions. Please run 'C:\Users\admin\xs-dev\esp32\esp-idf\install.bat' to install it.
ERROR: tool xtensa-esp32s2-elf has no installed versions. Please run 'C:\Users\admin\xs-dev\esp32\esp-idf\install.bat' to install it.
ERROR: tool xtensa-esp32s3-elf has no installed versions. Please run 'C:\Users\admin\xs-dev\esp32\esp-idf\install.bat' to install it.
ERROR: tool riscv32-esp-elf has no installed versions. Please run 'C:\Users\admin\xs-dev\esp32\esp-idf\install.bat' to install it.
ERROR: tool cmake has no installed versions. Please run 'C:\Users\admin\xs-dev\esp32\esp-idf\install.bat' to install it.An unsupported version of tool cmake was found in PATH: 3.26.4.
ERROR: tool openocd-esp32 has no installed versions. Please run 'C:\Users\admin\xs-dev\esp32\esp-idf\install.bat' to install it.
Not using an unsupported version of tool ninja found in PATH: 1.11.0.
ERROR: tool ccache has no installed versions. Please run 'C:\Users\admin\xs-dev\esp32\esp-idf\install.bat' to install it.
ERROR: tool dfu-util has no installed versions. Please run 'C:\Users\admin\xs-dev\esp32\esp-idf\install.bat' to install it.

C:\Users\admin\xs-dev\moddable>

@granel2
Copy link
Author

granel2 commented Aug 25, 2023

after :

xs-dev run --example helloworld --device=esp32 --port COM3

received:


** Visual Studio 2022 Developer Command Prompt v17.7.2
** Copyright (c) 2022 Microsoft Corporation


[vcvarsall.bat] Environment initialized for: 'x86'
Setting PYTHONNOUSERSITE, was not set
Using Python in C:\Users\admin\xs-dev\esp32\esp-idf
'null' is not recognized as an internal or external command,
operable program or batch file.
Using Git in C:\Espressif\tools\idf-git\2.34.2\cmd
git version 2.34.1.windows.1
Setting IDF_PATH: C:\Users\admin\xs-dev\esp32\esp-idf

Adding ESP-IDF tools to PATH...
Not using an unsupported version of tool cmake found in PATH: 3.26.4.
Not using an unsupported version of tool ninja found in PATH: 1.11.0.
C:\Espressif\tools\xtensa-esp32-elf\esp-2021r2-patch5-8.4.0\xtensa-esp32-elf\bin
C:\Espressif\tools\xtensa-esp32s2-elf\esp-2021r2-patch5-8.4.0\xtensa-esp32s2-elf\bin
C:\Espressif\tools\xtensa-esp32s3-elf\esp-2021r2-patch5-8.4.0\xtensa-esp32s3-elf\bin
C:\Espressif\tools\riscv32-esp-elf\esp-2021r2-patch5-8.4.0\riscv32-esp-elf\bin
C:\Espressif\tools\esp32ulp-elf\2.35_20220830\esp32ulp-elf\bin
C:\Espressif\tools\cmake\3.23.1\bin
C:\Espressif\tools\openocd-esp32\v0.11.0-esp32-20220706\openocd-esp32\bin
C:\Espressif\tools\ninja\1.10.2
C:\Espressif\tools\idf-exe\1.0.3
C:\Espressif\tools\ccache\4.3\ccache-4.3-windows-64
C:\Espressif\tools\dfu-util\0.9\dfu-util-0.9-win64
C:\Espressif\python_env\idf4.4_py3.11_env\Scripts
C:\Users\admin\xs-dev\esp32\esp-idf\tools

Checking if Python packages are up to date...
C:\Users\admin\xs-dev\esp32\esp-idf\tools\check_python_dependencies.py:12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
The following Python requirements are not satisfied:
click>=7.0
pyserial>=3.3
future>=0.15.2
cryptography>=2.1.4
pyparsing>=2.0.3,<2.4.0
pyelftools>=0.22
idf-component-manager~=1.0
gdbgui==0.13.2.0
pygdbmi<=0.9.0.2
python-socketio<5
jinja2<3.1 # See espressif/esp-idf#8760
itsdangerous<2.1
kconfiglib==13.7.1
reedsolo>=1.5.3,<=1.5.4
bitstring>=3.1.6
ecdsa>=0.16.0
construct==2.10.54
esp-windows-curses; sys_platform == 'win32'
To install the missing packages, please run "C:\Users\admin\xs-dev\esp32\esp-idf\install.bat"
Diagnostic information:
IDF_PYTHON_ENV_PATH: C:\Espressif\python_env\idf4.4_py3.11_env
Python interpreter used: C:\Espressif\python_env\idf4.4_py3.11_env\Scripts\python.exe

| Building and deploying project C:\Users\admin\xs-dev\moddable\examples\helloworld on esp32
Using recommended ESP-IDF v4.4.3
/ Building and deploying project C:\Users\admin\xs-dev\moddable\examples\helloworld on esp32
1 file(s) copied.
1 file(s) copied.

  • Building and deploying project C:\Users\admin\xs-dev\moddable\examples\helloworld on esp32
    Traceback (most recent call last):
    File "C:\Users\admin\xs-dev\esp32\esp-idf\tools\idf.py", line 36, in
    from idf_py_actions.tools import executable_exists, idf_version, merge_action_lists, realpath # noqa: E402
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\admin\xs-dev\esp32\esp-idf\tools\idf_py_actions\tools.py", line 7, in
    import click
    ModuleNotFoundError: No module named 'click'
    NMAKE : fatal error U1077: 'python %IDF_PATH%\tools\idf.py -n reconfigure -D SDKCONFIG_DEFAULTS=C:/Users/admin/xs-dev/moddable/build/tmp/esp32//debug/helloworld/xsProj-esp32/sdkconfig.mc -D SDKCONFIG_HEADER="C:\Users\admin\xs-dev\moddable\build\tmp\esp32\debug\helloworld\xsProj-esp32\build\config\sdkconfig.h" -D CMAKE_MESSAGE_LOG_LEVEL=ERROR -D DEBUGGER_SPEED=460800 -D IDF_TARGET=esp32 -D ESP32_SUBCLASS=esp32 -D SDKCONFIG_DEFAULTS=C:\Users\admin\xs-dev\moddable\build\tmp\esp32\debug\helloworld\xsProj-esp32\sdkconfig.mc' : return code '0x1'

C:\Users\admin\xs-dev\moddable>

@andycarle
Copy link
Member

C:\Users\admin\xs-dev\moddable>xs-dev run --example helloworld --device esp8266 The current environment does not appear to be set up for the ESP8266 build target. Please run xs-dev setup --device esp8266 before trying again.

C:\Users\admin\xs-dev\moddable>xs-dev run --example helloworld --device esp8266 --port COM3 The current environment does not appear to be set up for the ESP8266 build target. Please run xs-dev setup --device esp8266 before trying again.

=========================== all install good, but can not download to esp8266(( can you help me?))

It's not clear to me if you restarted the Moddable Command Prompt between installing the ESP8266 pieces and trying to use them. In the screenshot above this post, it appears not. Make sure you do so to get the new environment variables loaded.

@granel2
Copy link
Author

granel2 commented Aug 25, 2023

I restarted the terminal and the computer and in the process of finding a solution.
Moreover, I installed the necessary software package for the ESP32 - I did not manage to avoid problems.
For now, it only works on a Macbook.
it remains to install Linux on a virtual machine, to test my theory about the Beta version for Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants