Closed adwydman closed 6 years ago
Try following the link. Does it work? :)
Do you mean http://localhost/managed-files/wujkoj9n22/grid.html.zip
? If yes then it doesn't work: {"statusCode":404,"error":"Not Found"}
What Sealious version are you on? I highly recommend using the alpha
version right now:
npm install --save sealcode/sealious#alpha
Right after the npm install --save sealcode/sealious#alpha
:
$ node .
14:27:07.733 - info: Loading plugins...
14:27:07.823 - debug: sealious (C:\Users\anwi\Desktop\fka-bookshop\node_modules\sealious\package.
json) requires: sealious-datastore-tingo
14:27:08.998 - info: ✓ sealious-datastore-tingo (C:\Users\anwi\Desktop\fka-bookshop\node_modul
es\sealious-datastore-tingo)
14:27:09.026 - debug: fka-bookshop (C:\Users\anwi\Desktop\fka-bookshop\package.json) requires: se
alious-channel-rest, sealious-datastore-mongo, sealious-www-server
14:27:09.030 - debug: sealious-channel-rest (C:\Users\anwi\Desktop\fka-bookshop\node_modules\seal
ious-channel-rest\package.json) requires: sealious-www-server
C:\Users\anwi\Desktop\fka-bookshop\node_modules\sealious\lib\chip-types\chip-manager.js:59
if(chips[type][name]) throw Error(`Chip '${type}.${name}' already exists!`);
^
Error: Chip 'field_type.color' already exists!
at Error (native)
at Object.ChipManager.add_chip (C:\Users\anwi\Desktop\fka-bookshop\node_modules\sealious\lib\
chip-types\chip-manager.js:59:31)
at new FieldType (C:\Users\anwi\Desktop\fka-bookshop\node_modules\sealious\lib\chip-types\fie
ld-type.js:35:15)
at Object.<anonymous> (C:\Users\anwi\Desktop\fka-bookshop\node_modules\sealious-www-server\de
fine\field_type.color.js:5:24)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\Users\anwi\Desktop\fka-bookshop\node_modules\sealious-www-server\se
alious-www-server.js:4:1)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at load_plugins_from_dir (C:\Users\anwi\Desktop\fka-bookshop\node_modules\sealious\lib\plugin
s\plugin-manager.js:58:5)
at load_plugins_from_dir (C:\Users\anwi\Desktop\fka-bookshop\node_modules\sealious\lib\plugin
s\plugin-manager.js:56:4)
at Object.PluginManager.load_plugins (C:\Users\anwi\Desktop\fka-bookshop\node_modules\sealiou
s\lib\plugins\plugin-manager.js:75:3)
at Object.Sealious.init (C:\Users\anwi\Desktop\fka-bookshop\node_modules\sealious\lib\main.js
:52:25)
at Object.<anonymous> (C:\Users\anwi\Desktop\fka-bookshop\index.js:2:10)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.runMain (module.js:575:10)
at run (node.js:348:7)
at startup (node.js:140:9)
at node.js:463:3
I think it means you're using an outdated sealious-www-server plugin (I think in the past the plugin contained the color
field-type!)
rm -rf node_modules
npm install --save sealcode/sealious-www-server#alpha sealcode/sealious-channel-rest#alpha
npm install
Another error:
$ node .
14:41:43.684 - info: Loading plugins...
14:41:43.828 - debug: sealious (C:\Users\anwi\Desktop\fka-bookshop\node_modules\sealious\package.
json) requires: sealious-datastore-tingo
14:41:44.677 - info: ✓ sealious-datastore-tingo (C:\Users\anwi\Desktop\fka-bookshop\node_modul
es\sealious-datastore-tingo)
14:41:44.740 - debug: fka-bookshop (C:\Users\anwi\Desktop\fka-bookshop\package.json) requires: se
alious-channel-rest, sealious-datastore-mongo, sealious-www-server
14:41:44.753 - debug: sealious-channel-rest (C:\Users\anwi\Desktop\fka-bookshop\node_modules\seal
ious-channel-rest\package.json) requires: sealious-www-server
14:41:46.063 - info: ✓ sealious-www-server (C:\Users\anwi\Desktop\fka-bookshop\node_modules\se
alious-channel-rest\node_modules\sealious-www-server)
14:41:46.087 - info: ✓ sealious-channel-rest (C:\Users\anwi\Desktop\fka-bookshop\node_modules\
sealious-channel-rest)
{ Error: Cannot find module '../build/Release/bson'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\Users\anwi\Desktop\fka-bookshop\node_modules\bson\ext\index.js:15:1
0)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\Users\anwi\Desktop\fka-bookshop\node_modules\bson\lib\bson\index.js
:3:24)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\Users\anwi\Desktop\fka-bookshop\node_modules\mongodb\lib\mongodb\in
dex.js:2:22)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\Users\anwi\Desktop\fka-bookshop\node_modules\sealious-datastore-mon
go\index.js:3:15)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at load_plugins_from_dir (C:\Users\anwi\Desktop\fka-bookshop\node_modules\sealious\lib\plugin
s\plugin-manager.js:58:5)
at Object.PluginManager.load_plugins (C:\Users\anwi\Desktop\fka-bookshop\node_modules\sealiou
s\lib\plugins\plugin-manager.js:75:3)
at Object.Sealious.init (C:\Users\anwi\Desktop\fka-bookshop\node_modules\sealious\lib\main.js
:52:25)
at Object.<anonymous> (C:\Users\anwi\Desktop\fka-bookshop\index.js:2:10) code: 'MODULE_NOT_FO
UND' }
js-bson: Failed to load c++ bson extension, using pure JS version
14:41:47.607 - info: ✓ sealious-datastore-mongo (C:\Users\anwi\Desktop\fka-bookshop\node_modul
es\sealious-datastore-mongo)
14:41:47.640 - info: sealious-www-server (already loaded)
C:\Users\anwi\Desktop\fka-bookshop\node_modules\sealious\lib\chip-types\chip-manager.js:139
throw Errors.Error("Chip manager was requested to return a datast
ore chip. Multiple chips of type `datastore` have been registered, and no default provided in con
figuration.");
^
undefined
Add this before Sealious.init()
:
Sealious.ConfigManager.set_config("datastore_chip_name", "mongo");
Did it work? :)
Yes, now it works. :)
Now that I'm using new Sealious version, this is what I get when I want to GET
a resource from db:
{
"message": "No child subject with key 'books' in RootSubject",
"type": "bad_subject",
"data": {}
}
what path are you GET
ing? Should be /api/v1/collections/books/:id
Issues moved do Sealcode's phabricator: https://hub.sealcode.org/project/view/11/
When I upload a file via Sealious, this is what's stored in the database:
The path stored in the DB is
/managed-files
, but the directory in Sealious app isuploaded_files
.