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

readFileSync import in config.ts #295

Closed
elvuel opened this issue Jul 2, 2021 · 6 comments
Closed

readFileSync import in config.ts #295

elvuel opened this issue Jul 2, 2021 · 6 comments
Assignees
Labels
invalid This doesn't seem right

Comments

@elvuel
Copy link

elvuel commented Jul 2, 2021

Trying casbin.js with svelte(rollup), got Error: 'readFileSync' is not exported ...
fs import should be the same way as utils/utils.ts(import * as fs from 'fs';)

@nodece
Copy link
Member

nodece commented Jul 3, 2021

@elvuel could you provide a demo for this issue?

@hsluoyz hsluoyz self-assigned this Jul 4, 2021
@elvuel
Copy link
Author

elvuel commented Jul 8, 2021

@nodece put initial recap to: https://github.com/elvuel/sevlte-casbin-spike

image

took some partial refs like from rollup#897 rollup#3230 etc,with no luck.(could be my bad, not familiar with node/js such rel staffs)

after made the changes to config.ts it works, and on the other hand it should be the same style to utils/utils.ts within the repo.

@hsluoyz
Copy link
Member

hsluoyz commented Jul 9, 2021

@Gabriel-403 @Zxilly

@hsluoyz hsluoyz added the bug Something isn't working label Jul 9, 2021
@Gabriel-403
Copy link
Contributor

I'll fix it as soon as possible, please give me some time

@Zxilly
Copy link
Contributor

Zxilly commented Jul 9, 2021

@Gabriel-403 I already created a correspond PR at #296, we just need more discussion.

@nodece
Copy link
Member

nodece commented Jul 10, 2021

Hello @elvuel, I tried to create a sevlte project with codesandbox: https://codesandbox.io/s/sweet-worker-jbu71?file=/Button.svelte, found to work properly.

I think it's a rollup problem in your project, so I close this issue, I'm sure webpack is working. If you are interested, you can try it.

@nodece nodece closed this as completed Jul 10, 2021
@hsluoyz hsluoyz removed this from Node-Casbin Easy Tasks in Casbin Easy Tasks for Beginners/Student Applicants Jul 11, 2021
@hsluoyz hsluoyz added invalid This doesn't seem right and removed bug Something isn't working labels Jul 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants