Dexie.js
Dexie.js copied to clipboard
dexie-export-import problem with MAX_BUFFER_LENGTH on clarinet
Hello, I just saw this link(https://github.com/dexie/Dexie.js/issues/902)
and there is a 10 MB limit for dexie-export-import.
What I want to do is to increase this limit up to 100MB.
So, here are my steps
- I just forked (https://github.com/minyoung90/clarinet) and I updated "MAX_BUFFER_LENGTH" value.
- Edit package.json and publish it with npm (e.g. @myc90/clarinet)
- And also, I forked (https://github.com/minyoung90/Dexie.js) and I updated package.json in "dexie.js/addons/dexie-export-import/"
- For test, I run "npm install" current working directory, but I got error message blow
npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "workspace:": workspace:^2.0.4 || ^3.0.0 || ^4.0.0-alpha.1
- So, I updated "workspace:^2.0.4" to "^2.0.4"
- "npm install" is fine and publish it with npm (e.g. @myc90/dexie-export-import)
- Finally, I chaged "dexie-export-import" to "@myc90/dexie-export-import" in my project, but I got error below
[ERROR] [plugin vite:dep-scan] Failed to resolve entry for package "@myc90/dexie-export-import". The package may have incorrect main/module/exports specified in its package.json: Failed to resolve entry for package "@myc90/dexie-export-import". The package may have incorrect main/module/exports specified in its package.json.
I need help!!!
updated #1: I found In my project, In node_modules, in "@myc90/dexie-export-import" only two files exists, package.json and README.md. I think publishing @myc90/dexie-export-import is wrong. but I don't know where I start from
updated #2: I put a step below between 5 and 6, "npm install" and then "npm run build" but "npm run build" was failed. and error was...
src/json-stream.ts(1,22): error TS2307: Cannot find module 'clarinet' or its corresponding type declarations.
src/tson.ts(58,17): error TS2354: This syntax requires an imported helper but module 'tslib' cannot be found.
just-build default failed. tsc -p src returned 2
Error: just-build default failed. tsc -p src returned 2
So I checked "node_modules", There was no "@myc90/clarinet", what happened here? wrong "package.json"?
// package.json in Dexie.js/addons/dexie-export-import
{
"name": "@myc90/dexie-export-import", // edited
"version": "4.0.4",
"packageManager": "^[email protected]",
"description": "Dexie addon that adds export and import capabilities",
"main": "dist/dexie-export-import.js",
"module": "dist/dexie-export-import.mjs",
"typings": "dist/dexie-export-import.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/dexie/Dexie.js.git"
},
"scripts": {
"test": "just-build test && npx karma start test/karma.conf.js --single-run",
"build": "just-build",
"watch": "just-build --watch",
"clean": "rm -rf tools/tmp dist/*.js dist/*.mjs dist/*.map dist/*.d.ts test/bundle.*"
},
"just-build": {
"default": [
"just-build src",
"just-build test"
],
"src": [
"tsc -p src",
"rollup -c tools/build-configs/rollup.config.js"
],
"test": [
"tsc -p test [--watch 'Watching for file changes.']",
"rollup -c tools/build-configs/rollup.config.js",
"rollup -c tools/build-configs/rollup.tests.config.js"
]
},
"author": "[email protected]",
"license": "Apache-2.0",
"devDependencies": {
"@rollup/plugin-alias": "^3.1.2",
"@types/node": "^13.5.1",
"base64-arraybuffer-es6": "*",
"clarinet": "@myc90/clarinet", // edited
"just-build": "^0.9.24",
"rollup-plugin-alias": "^2.2.0",
"typeson": "^5.8.2",
"typeson-registry": "^1.0.0-alpha.21"
},
"peerDependencies": {
"dexie": "^2.0.4 || ^3.0.0 || ^4.0.0-alpha.1" // edited
}
}
I found, in package.json "@myc90/clarinet" is wrong, it should be git repository not published name by npm. but still don't know why step 4 is wrong.
We've switched to pnpm. It supports the workspace prefix and makes it easier to work with multiple packages in the same repo. To get started with editing dexie and addons, see https://github.com/dexie/Dexie.js/blob/master/CONTRIBUTING.md
@dfahlander Thanks!
Hi @dfahlander , do you have in pipe to add to dexie-export-import the clarinet max buffer lenght as parameter?
Hi @dfahlander , do you have in pipe to add to dexie-export-import the clarinet max buffer lenght as parameter?
Clarinet package does not allow passing this as an argument so it would require rewriting that package if so. Any PR for this into the clarinet fork would be welcome, along with another PR to Dexie repo for utilizing the option.