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

Question: Can I use nano-sql in cocos creator? #82

Open
boy12371 opened this issue Sep 10, 2018 · 3 comments
Open

Question: Can I use nano-sql in cocos creator? #82

boy12371 opened this issue Sep 10, 2018 · 3 comments
Labels
bug

Comments

@boy12371
Copy link

@boy12371 boy12371 commented Sep 10, 2018

I tried to use it in cocos but it didn't work.
It shows:
ERROR: TypeError: undefined is not a constructor (evaluating 'new index_1.NanoSQLDefaultBackend()'), location: __node_modules/nano-sql/lib/index.js:65:49
6c4b662f-72ab-4ce4-af7c-3a4db9ec04c8

@ClickSimply
Copy link
Owner

@ClickSimply ClickSimply commented Sep 10, 2018

I'm not familiar with Cocos Creator, I never heard it before this issue!

After doing some research I think the problem is you need to import the nano-sql bundle instead of the nodejs module.

So you should use the single file bundle here: https://raw.githubusercontent.com/ClickSimply/Nano-SQL/master/dist/nano-sql.min.js instead of importing it using require statements.

@boy12371
Copy link
Author

@boy12371 boy12371 commented Sep 10, 2018

1
2
It still didn't work.

@ClickSimply
Copy link
Owner

@ClickSimply ClickSimply commented Oct 17, 2018

I'm not familiar with Coco's creator at all, hopefully someone with more experience can hop in here and help out.

Otherwise I'm not sure what's causing this bug and I won't have several hours to learn Cocos creator and dig into this for quite a while.

@ClickSimply ClickSimply added the bug label Oct 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.