dy / save-file Goto Github PK
View Code? Open in Web Editor NEWSave any data to file in browser or node
Save any data to file in browser or node
Getting below error
Issue 1:
import { save } from 'save-file'
Error:
Module '"../../../../../../../xxxxxx/node_modules/save-file"' has no exported member 'save'
import save from 'save-file'
Error:
This module is declared with using 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag
Issue 2:
Using const save = require('save-file/sync')
Error:
error TS2305: Module '"C://node_modules/save-file/index"' has no exported member 'save'.
src/app/.component.ts(6,22): error TS2497: Module '"C:/***/node_modules/save-file/index"' resolves to a non-module entity and cannot be imported using this construct.
just updated to the latest build and I'm getting errors when it runs.
Module not found: Error: Can't resolve 'save-file'
I switched to 2.0.0 and it works fine.
Hello,
According to https://www.npmjs.com/package/save-file latest release is 2.3.1.
Could you create this release/tag (2.3.1)? We need release for software clearing.
Thanks
Branch | Build failing π¨ |
---|---|
Dependency | is-browser |
Current Version | 2.0.1 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
is-browser is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Hello,
I tried to use save-file on a blob and safari 14 and 15 on Mac fail with Cannot navigate to data URL.
Is there any possible solution for this?
We need to generate a pdf client side and download it locally.
Thanks.
I believe there is a limit for the blob/file size or else it will fail Didn't see anything in the readme, you might want to include that. Ill edit if I find out the max file size.
Only tested 2 files: fails on 1GB, works for 100MB.
Edit:
NVM about the file size. Tested with another 1GB file and it worked fine. But for some reason, I'm getting "Render process gone" on one specific file. Any idea why?
I'm trying to use save-file to open a dialog with a suggested filename in the "Save As" field. I'm testing with Chrome on both macOS and Ubuntu. I started with your README example, as well as several variations:
import { save } from 'save-file'
const data = '{\n"message": "This is a test"\n}';
await save(data, 'test.json'); <-- saves directly to "~/Downloads/test.json", no prompt
await save(data); <-- opens prompt, but suggested filename is literally {_"message"_ "This is a test"_}, see below
const file = new File([data], 'test.json');
await save(file, 'test.json') <-- saves directly to "~/Downloads/test.json", no prompt
await save(file) <-- saves directly to "~/Downloads/test.json", no prompt
Ideally it would open a dialog with the Save as
field seeded with the filename. Is there a way to do this with save-file?
i using with version 1.3.0
[My simple code]
const save = require('save-file')
save(myImage, saveTo, (err, rawData) => {
if(err) {
console.log('save failed.')
} else {
console.log('saved.')
}
});
[Run result]
nothing response on screen
But image saved to my path is work!
remark**
more than version 1.3.0 callback is working but save file not working
pls. help me
When I am trying to call save() multiple times, multiple download location dialogs are opening.
Can we control it? Please help me
Think about
save(buf, where, (err, rawData) => {})
Might be nice to know what exactly data been saved
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.