Closed dmfenton closed 7 years ago
Hi @dmfenton,
if you check your file on Github you can already spot the syntax error :)
@lusentis I guess the error message could be improved?
Thanks! I updated this issue to reflect the confusing error message.
I fixed the syntax error but now I get this
dawson dev
Execution Error
dawson configuration error
Possible cause
Path specified by 'assetsDir' does not exist.
Possible solution
Directory does not exist: '/Users/foobar/repos/koop-provider-craigslist/assets',
either create this directory, set the correct value for the 'assetsDir' property
in package.json, or set 'assetsDir' to false if you're not using static assets.
@dmfenton quoting the documentation: "Specify false to skip deploying assets", and I assume that's what you are trying to do.
Looking at the code, it seems like such error message would never show up if assetsDir
is actually false
.
In case you are not specifying false
, then could you share your current configuration? (your package.json doesn't seem to be up to date?)
assetsDir is false and this is showing up. I just pushed up the code again
@dmfenton I think the problem is that assetsDir
should be defined inside a dawson
property in your package.json file, as documented here.
yep, that did it. thank you. I must say I'm not sure I understood what Dawson Dev was going to do. I thought it was going to start a server locally, but looks like its actually pushing things to AWS?
You are welcome.
Yes, Dawson will run a local server if you execute dawson dev
. The local development documentation is not complete yet, but it will be very soon :)
Thanks to everyone,
package.json
contains a syntax error.assetsDir
so that a missing directory won't cause the command to fail.I thought it was going to start a server locally, but looks like its actually pushing things to AWS?
dev server docs are coming asap, in the meantime (any suggestion / PR to make this more clear will be really appreciated):
dawson dev
:
AWS IAM Role
s. Such IAM Roles need to exist on AWS, this is why dawson dev will ask you to run dawson deploy
first (no other resource is currently used internally by the dev server)@dmfenton Hope this clarifies your expectations, if not, please let us know!
Thanks for your feedback,
@dmfenton It would be awesome if you could start a PR to fix this message.
Starting from this line: https://github.com/dawson-org/dawson-cli/blob/master/src/config.js#L354
I'd do an if
to check if the error is instanceof SyntaxError
and display the appropriate message (see https://github.com/dawson-org/dawson-cli/blob/master/src/libs/language-javascript-latest/describeApi.js#L50 for a similar implementation).
I appreciate your help on this, but I've decided to go with Claudia.js for now. Will check back in with this project sometime in the future!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
fixed in 828381c9efc75a6b01cfcd132daaf34d76ff09af, will be released in v0.28 soon.
additionally, 56156cab59b8581a08220c412c1a007a70735043 fixes that assetsDir
behaviour and allows deploying without having to specify assetsDir = false.
Package.json exists but there is a syntax error
https://github.com/dmfenton/koop-provider-craigslist/tree/dawson