"INSTANT_DATA" is not internal or external command, executable program, or batch file
In general, we have 1 main problem, this is - "INSTANT_DATA" is not internal or external command, executable program, or batch file. When we use "yarn seed".
Maybe I need to install a package?

Can you provide a translation of the message following "INSTANT_DATA" and more details about your system so we can try and help ?
EDIT: is it "is not internal or external command, executable program, or batch file" ?
By the way, it looks like you’re using Windows. As stated in the README the server is currently only tested in UNIX environment.
Can you provide a translation of the message following
"INSTANT_DATA"and more details about your system so we can try and help ?EDIT: is it "is not internal or external command, executable program, or batch file" ?
By the way, it looks like you’re using Windows. As stated in the README the server is currently only tested in UNIX environment.
I myself have stelace working fine on http: // localhost: 4100 showing {"message": "Welcome to Stelace API. Please have a look at https://stelace.com/docs to see what we can build together." }. But I need to add, for example, a product to the database. For this I need to use apiKey: 'seck_test' - and with the yarn seed I am trying to create an apikey.
What is on the screen is translated like this: "INSTANT_DATA" is not internal or external command, executable program, or batch file.
Yes indeed, you need an API key. Can you share your version of Windows ?
The problem is probably we should use cross-env to set env variables in such script lines:
https://github.com/stelace/stelace/blob/11e58c2b30c0b1bda6fc7a9499191c07387a4a03/package.json#L41
like "cross-env INSTANT_DATA=true npm test scripts/instantData.js"
Yes indeed, you need an API key. Can you share your version of Windows ?
The problem is probably we should use
cross-envto set env variables in such script lines:https://github.com/stelace/stelace/blob/11e58c2b30c0b1bda6fc7a9499191c07387a4a03/package.json#L41
like
"cross-env INSTANT_DATA=true npm test scripts/instantData.js"
I have WINDOWS 10 normal.
Yes indeed, you need an API key. Can you share your version of Windows ?
The problem is probably we should use
cross-envto set env variables in such script lines:https://github.com/stelace/stelace/blob/11e58c2b30c0b1bda6fc7a9499191c07387a4a03/package.json#L41
like
"cross-env INSTANT_DATA=true npm test scripts/instantData.js"
Did as you said, now it shows.

I suppose you ran yarn add -D cross-env first ?
If you were able to run the server before, bluebird is supposed to be installed. Can you try to start the server again?
@woyuen or I will look at this cross-platform issue in the morning.
I suppose you ran
yarn add -D cross-envfirst ? If you were able to run the server before,bluebirdis supposed to be installed. Can you try to start the server again?@woyuen or I will look at this cross-platform issue in the morning.
I still have an error but this one.
Can we go to Telegram or WhatsApp?

Again, can you translate your message ending with .length?
It seems related to node OS built-in module.
We don’t provide live support for community as we have live limited resources. Here it can help other users in the future.
Unexpected appearance: .length.
вт, 3 нояб. 2020 г. в 09:54, Andy Bruère [email protected]:
Again, can you translate your message ending with .length? It seems related to node OS built-in module.
We don’t provide live support for community as we have live limited resources. Here it can help other users in the future.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stelace/stelace/issues/468#issuecomment-720960086, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFP55LQLWQGKSBGTF5CJ4ZTSN6ZLBANCNFSM4THJV6GA .

We’ll try to reproduce on Windows.
Meanwhile I invite you to use a Docker container for the API server as explained in the README.
https://github.com/stelace/stelace#develop-with-api-server-container
Stelace server is built on and deployed to Linux machines (Ubuntu), and you may have some trouble running server with another OS. Docker can solve this with ease.
#> We’ll try to reproduce on Windows.
Meanwhile I invite you to use a Docker container for the API server as explained in the README.
https://github.com/stelace/stelace#develop-with-api-server-container
Stelace server is built on and deployed to Linux machines (Ubuntu), and you may have some trouble running server with another OS. Docker can solve this with ease.
I have now rented a VPS on linux centos. And trying to install stelace. I'm stuck at this point, please help.
Error: connect ECONNREFUSED 127.0.0.1:6543
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)

The error is about a connection issue to PostgreSQL database. Did you start databases with the command yarn docker:db beforehand?
If you did it, then there's some issue preventing the code to reach the database as connection cannot be established.
The error is about a connection issue to PostgreSQL database. Did you start databases with the command
yarn docker:dbbeforehand?If you did it, then there's some issue preventing the code to reach the database as connection cannot be established.
Yes, I do as instructed. If I give you access to the server, can you show me how to run Stelace on the server? So that I can make sure that Stelace works.

If you think there is problem with database containers please open a new issue.
And this time please include your development .env file, your node version, your OS version.
If you think there is problem with database containers please open a new issue.
And this time please include your development
.envfile, your node version, your OS version.
I did it https://github.com/stelace/stelace/issues/469
Hi Abruere, I have the same error with INSTANT_DATA when running 'yarn seed', do you have any update with this issue? Andy
Hi @andychin8, can you give more details about your environment ? (OS and node versions in particular)
Hi @andychin8, can you give more details about your environment ? (OS and node versions in particular)
Hi Andy, Thanks for getting back, I got this running now when running in docker, I have ran the following successfully and initialise the platform POST /store/platforms POST /store/platforms/:patformId/init POST /store/platforms/:patformId/cache/sync but having issue creating ApiKey? POST http://127.0.0.1:4100//roles (have tried dev, public, user) POST http://127.0.0.1:4100/api-keys { "name": "customapikey", "roles": [], "permissions": [ "asset:create:all" ] } how do you create this apiKey without the Authorization? Are they any reference where we can find more info how you set a platform and sample?
Thanks for providing those information.
You need to provide special headers that aren't documented yet because yarn seed should correctly initialize platforms. We'll add some documentation about manual platform creation.
Given you successfully created a platform, we presume you used the following headers:
-
x-stelace-system-keyfor the system key -
x-stelace-envfor the environment
Another header needs to be provided to target the correct platform to create the API key:
-
x-platform-idwith the platform ID returned after creation
By providing those 3 headers, you can create the API key. Please note that the system key must only be used in safe environment. For unsafe environments (like client-side), API keys must be used instead.
@woyuen I'm building my own setup script like in the marketplace demo including the logic to initialize the platform contained in the seed script of this project.
Basicaly, after calling the routes store.createPlatform, store.initPlatform and store.migrateDatabase I'm left with creating the API keys and seeding the marketplace default data and configurations.
The problem comes when I try to call apiKey.create with the headers you suggested (x-stelace-system-key, x-stelace-env and x-platform-id). The request is authenticated correctly but the API returns an error because the dev role that I want to assign to the API key does not exists.
I also tried creating the role calling role.create without success. It says "customRole" is not allowed.
Do you have any tips on how I should proceed?
Nevermind... I think the issue was on my side. The flow I described above actually works
@izziaraffaele, I confirm your flow is correct. The only thing I don't understand is why the role creation is rejected. I checked locally that it works.
Don't hesitate to post additional information if you're still blocked on this, so we can help you.
@woyuen it was an error on my side, everything works fine now!
The seed script is very helpful to quickstart a platform for development purposes. I would make it more reusable by simply adding an option to disable hardcoded API key creation. This way I can spin up the platform, create the key myself and I'm ready to go... With this little change the seed script could be used also in other cases such as setting up staging/production environment, spinning up multiple platforms in the same server.
@izziaraffaele thanks for the feedback. This improvement is a good idea. We'll consider implementing it.
I suppose you ran
yarn add -D cross-envfirst ? If you were able to run the server before,bluebirdis supposed to be installed. Can you try to start the server again? @woyuen or I will look at this cross-platform issue in the morning.I still have an error but this one.
Can we go to Telegram or WhatsApp?
I got the "tests failed' error while trying to run everything on Docker when I tried running "yarn seed". It turns out Ava's default timeout did now allow the yarn "test" script to complete. Instead, the tests timed out and were reported as failed. I added a "--timeout=5m" switch to the "test" script in package.json and both the tests and the "yarn seed" command succeeded.
Just putting it here in case it helps someone else. If other users are running into this as well, maybe someone senior can take a look at the tests or we could just consider manually overriding the timeout.
One of the options is to use Linux, you could use wsl2 on Windows. These issues should not occur there.