Can't create SPA
crazy-explore-r opened this issue · comments
frappe@soft-ragul:~/frappe-bench/apps/novelite$ bench add-spa
Dashboard Name [dashboard]: react-dashboard
App Name: novelite
Which framework do you want to use? (vue, react) [vue]: react
Configure TypeScript? [y/N]: n
Generating spa...
Scaffolding React project...
yarn create v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
error create-vite@5.0.0: The engine "node" is incompatible with this module. Expected version "^18.0.0 || >=20.0.0". Got "16.15.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.
Installing dependencies...
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 109, in <module>
main()
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
click.Group(commands=commands)(prog_name="bench")
File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/frappe/frappe-bench/apps/doppio/doppio/commands/__init__.py", line 35, in generate_spa
generator.generate_spa()
File "/home/frappe/frappe-bench/apps/doppio/doppio/commands/spa_generator.py", line 42, in generate_spa
self.initialize_react_vite_project()
File "/home/frappe/frappe-bench/apps/doppio/doppio/commands/spa_generator.py", line 224, in initialize_react_vite_project
subprocess.run(
File "/usr/lib/python3.10/subprocess.py", line 503, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: PosixPath('../apps/novelite/react-dashboard')
Incompatible node version: The engine "node" is incompatible with this module. Expected version "^18.0.0 || >=20.0.0". Got "16.15.0"
error Found incompatible module.
Thank You Hussain ✌
Errors are due to socketio setup. Maybe something local or in starter, have to check.
Yes it is a port issue, I'm closing this ticket.
Thanks Hussain.
This was the answer I was looking for. Should provide a note in the documentation, reminding user to use appropriate node version.
I could happily contribute.
/frappe-bench$ bench add-spa
Dashboard Name [dashboard]:
App Name: demo_app
Which framework do you want to use? (vue, react) [vue]: vue
Configure TypeScript? [y/N]: N
Generating spa...
Scafolding vue project...
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 114, in
main()
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 20, in main
click.Group(commands=commands)(prog_name="bench")
File "/home/ubuntu/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/home/ubuntu/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home/ubuntu/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/ubuntu/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/ubuntu/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ubuntu/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/ubuntu/frappe-bench/apps/doppio/doppio/commands/init.py", line 35, in generate_spa
generator.generate_spa()
File "/home/ubuntu/frappe-bench/apps/doppio/doppio/commands/spa_generator.py", line 34, in generate_spa
self.initialize_vue_vite_project()
File "/home/ubuntu/frappe-bench/apps/doppio/doppio/commands/spa_generator.py", line 140, in initialize_vue_vite_proje
ct
subprocess.run(
File "/usr/lib/python3.10/subprocess.py", line 503, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.10/subprocess.py", line 971, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: PosixPath('../apps/demo_app')
Frappe Framework: v15.6.1 (version-15)
$ npm --version
10.2.3
$ node --version
v18.19.0