save-file
save-file copied to clipboard
Error while importing save from save-file package
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.
- When es modules for node stabilize, I'll include that. https://cdn.pika.dev/save-file works fine for now.
- There's no
save-file/syncentry anymore, userequire('save-file').saveSyncinstead.