You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm trying to run the x0 project on my laptop. I'm temporary skipping the OpenAI connection and the code generation step (will introduce that later on). The goal is to have a response from the backend with an hardcoded component example written in TS using your component library.
In dev mode everything works fine: code is transpiled and returned to FE.
In build mode instead, code gets built correctly, but I receive an error if I try to serve it.
These are the changes I made to your project, starting from branch 5-fix-errors-iteratively-step.
Inside backend folder I've added the following scripts to package.json (removed config.env as not needed atm):
Finally I've added a new backend script and renamed backend:dev script into the global package.json file:
"scripts": {
"backend": "npm run serve --prefix ./backend",
"backend:dev": "npm run serve:dev --prefix ./backend",
"frontend": "npm run dev --prefix ./frontend"
},
If I run npm backend I get the following error, returned as soon as the command starts:
/~/codemotion-x0/backend/node_modules/@mui/material/OutlinedInput/outlinedInputClasses.js:1
import _extends from "@babel/runtime/helpers/esm/extends";
^^^^^^
SyntaxError: Cannot use import statement outside a module
at internalCompileFunction (node:internal/vm:76:18)
at wrapSafe (node:internal/modules/cjs/loader:1283:20)
at Module._compile (node:internal/modules/cjs/loader:1328:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Module._load (node:internal/modules/cjs/loader:1019:12)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at require (node:internal/modules/helpers:177:18)
at Object.<anonymous> (/~/codemotion-x0/backend/node_modules/@xtreamsrl/react-ui-kit/src/TextInput/TextInput.styled.js:9:48)
at Module._compile (node:internal/modules/cjs/loader:1364:14)
The same behaviour happens if I install npm i --save-dev ts-node and use it in place of tsx when running in dev mode.
I think I'm missing a piece of how it is supposed to work.
Can you please help me out?
Thanks
The text was updated successfully, but these errors were encountered:
Hello, I'm trying to run the x0 project on my laptop. I'm temporary skipping the OpenAI connection and the code generation step (will introduce that later on). The goal is to have a response from the backend with an hardcoded component example written in TS using your component library.
In dev mode everything works fine: code is transpiled and returned to FE.
In build mode instead, code gets built correctly, but I receive an error if I try to serve it.
These are the changes I made to your project, starting from branch
5-fix-errors-iteratively-step
.Inside backend folder I've added the following scripts to package.json (removed config.env as not needed atm):
I've changed the
pipeline
method to run only the following code:Where
SOURCE_CODE
is the hardcoded component.Finally I've added a new
backend
script and renamedbackend:dev
script into the global package.json file:If I run
npm backend
I get the following error, returned as soon as the command starts:The same behaviour happens if I install
npm i --save-dev ts-node
and use it in place oftsx
when running in dev mode.I think I'm missing a piece of how it is supposed to work.
Can you please help me out?
Thanks
The text was updated successfully, but these errors were encountered: