ts-toolkit icon indicating copy to clipboard operation
ts-toolkit copied to clipboard

Build testapp vanilla error

Open sgalcheung opened this issue 1 year ago • 4 comments
trafficstars

When I run this testapp, run pnpm install occur this

Creating entry file 616 ms ⠇ Building modules │ (typescript) Error: /Users/sgalcheung/Downloads/ts-toolkit/shared/src/util/tokenizer/TextTokenizer.ts(40,29): semantic error TS2694: Namespace 'Intl' has no exported member 'Segmenter'. │ Error: /Users/sgalcheung/Downloads/ts-toolkit/shared/src/util/tokenizer/TextTokenizer.ts(40,29): semantic error TS2694: Namespace 'Intl' has no exported member 'Segmenter'.in-typescript2/dist/rollup-plugin-typescript2.cjs.js:25006:12) │ at error (/Users/sgalcheung/Downloads/ts-toolkit/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/shared/node-entry.js:5400:30)@3.9.10/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:29277:17) │ at throwPluginError (/Users/sgalcheung/Downloads/ts-toolkit/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/shared/node-entry.js:11878:12) │ at Object.error (/Users/sgalcheung/Downloads/ts-toolkit/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/shared/node-entry.js:12912:24) │ at Object.error (/Users/sgalcheung/Downloads/ts-toolkit/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/shared/node-entry.js:12081:38) │ at RollupContext.error (/Users/sgalcheung/Downloads/ts-toolkit/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:17237:30) │ at /Users/sgalcheung/Downloads/ts-toolkit/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:25033:23 │ at arrayEach (/Users/sgalcheung/Downloads/ts-toolkit/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:545:11) │ at Function.forEach (/Users/sgalcheung/Downloads/ts-toolkit/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:9397:14) │ at printDiagnostics (/Users/sgalcheung/Downloads/ts-toolkit/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:25006:12) │ at Object.transform (/Users/sgalcheung/Downloads/ts-toolkit/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:29277:17) │ at /Users/sgalcheung/Downloads/ts-toolkit/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/shared/node-entry.js:13117:25Namespace 'Intl' has no exported member 'Segmenter'. │ at runNextTicks (node:internal/process/task_queues:60:5) └─ Failed in 10s at /Users/sgalcheung/Downloads/ts-toolkit/shared  ELIFECYCLE  Command failed with exit code 1.

my env

sw_vers ProductName: macOS ProductVersion: 12.7.4 BuildVersion: 21H1123 node -v v21.7.3 pnpm --version 8.15.4 tsc --version Version 5.4.5

sgalcheung avatar Apr 29 '24 07:04 sgalcheung

#37

sgalcheung avatar Apr 29 '24 07:04 sgalcheung

Were you successful to launch the test app?

Somehow only when I explicetly used command pnpm install vite in testapp/vanilla folder, only then pnpm dev worked

However, it does not seem that the demo app actually works, since there is no publication server that can serve manifest and rest of the book content

rubywwwilde avatar Jun 17 '24 19:06 rubywwwilde

@sgalcheung Could you please retry now using the latest version of the develop branch? You will simply need to cd into the vanilla folder, and run pnpm install && pnpm run dev

@doomuch I did not include any books in the vanilla testapp directory, I might change that in the future as I agree it is a bit confusing, I just need to figure out the best way to keep the repo clutter-free. In the meantime, you can use the now-live instance of the publication server + the book query parameter, for example: Bella: http://localhost:5173/?book=https://publication-server.readium.org/QmVsbGFPcmlnaW5hbDMuZXB1Yg Moby Dick: http://localhost:5173/?book=https://publication-server.readium.org/bW9ieS1kaWNrLmVwdWI Please also let me know if this pnpm install vite is still an issue, it shouldn't be necessary

chocolatkey avatar Jul 11 '24 08:07 chocolatkey

When I run pnpm run dev, it's working fine for me. @chocolatkey

sgalcheung avatar Jul 11 '24 08:07 sgalcheung