Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling directories is broken in 14.x #49

Open
stevebest opened this issue Apr 5, 2018 · 6 comments
Open

Compiling directories is broken in 14.x #49

stevebest opened this issue Apr 5, 2018 · 6 comments
Labels

Comments

@stevebest
Copy link

Running a simple cdbb http://localhost:5984 ./couchdb works fine in version 1.14.0, but is completely broken in 14.2.0.

Basically, despite what the docs say, CommonJS index.js modules at best make the cdbb explode, and at worst - create an unexpected document with a single field called index containing its source code, which is totally not what I want.

Project structure:

project
  couchdb
    mydb
      index.js

Contents of project/couchdb/mydb/index.js:

module.exports = { _id: "test", foo: "bar" };

couchdb-bootstrap@1.14.0 runs as expected, creating a mydb/test document.


couchdb-bootstrap@14.2.0 throws an error at index.js:130:

TypeError: Cannot use 'in' operator to search for '_id' in module.exports = {
    "_id": "test",
    "foo": "bar"
};
@jo
Copy link
Owner

jo commented Apr 6, 2018

Hi @stevebest, thanks for the report!

I have added a testcase and can reproduce the problem.

While I am working on the fix please use couchdb-bootstrap@1.14.0 in the meantime. Sorry for the inconveniences.

@jo jo added the bug label Apr 6, 2018
@stevebest
Copy link
Author

Yeah, I guess sometimes jumping over 13 major versions breaks stuff 😜

@ghost
Copy link

ghost commented Feb 16, 2020

how can add a new atmosphere for star walk

@edorgeville
Copy link

edorgeville commented Mar 30, 2021

Hi @jo, the issue is still present in 15.0.0. Let me know if you want me to create a PR

@geertmulders
Copy link

We are running into the same problem (same as #54 ). Is there any update on this issue?

@akdasa
Copy link

akdasa commented Mar 4, 2023

Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants