Open dev-amirmufid opened 5 months ago
You need to enable moduleResolution: bundler
in your tsconfig.json.
I'll make it more clear in the docs. moduleResolution: node
is no longer supported
hey @andrewdoro After making the "moduleResolution: bundler" i am getting this error
@sreehari2003 I've released a new version. Can you try again?
@sreehari2003 I've released a new version. Can you try again?
The issue is still there
novel version: "0.3.1",
OS : Macos M1
"moduleResolution": "Bundler",
I have same issue Using Remix + Vite +Typescript blank project
(node:14544) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
11:54:58 [vite] Error when evaluating SSR module /app/routes/_index.tsx: failed to import "novel"
|- D:\github\admin-frontend\node_modules\tiptap-extension-auto-joiner\dist\index.js:1
import { Extension, getNodeType } from '@tiptap/core';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1178:20)
at Module._compile (node:internal/modules/cjs/loader:1220:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29)
at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
11:54:58 [vite] Error when evaluating SSR module virtual:remix/server-build: failed to import "/app/routes/_index.tsx"
|- D:\github\admin-frontend\node_modules\tiptap-extension-auto-joiner\dist\index.js:1
import { Extension, getNodeType } from '@tiptap/core';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1178:20)
at Module._compile (node:internal/modules/cjs/loader:1220:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29)
at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
11:54:58 [vite] Internal server error: Cannot use import statement outside a module
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1178:20)
at Module._compile (node:internal/modules/cjs/loader:1220:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29)
at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
D:\github\admin-frontend\node_modules\tiptap-extension-auto-joiner\dist\index.js:1
import { Extension, getNodeType } from '@tiptap/core';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1178:20)
at Module._compile (node:internal/modules/cjs/loader:1220:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29)
at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
Node.js v18.17.0
Process finished with exit code 1
I've identified the problem, I'll just make this extension opt-in tiptap-extension-auto-joiner
until I can update it upstream to fix esm. I'll release a new version today for novel.
any update on solving this? I try it on version 3.x, the one that still support the dragable icon on the left of the text. I try change it to bundler, but it will make import novel error.
Provide environment information
System: OS: Linux 6.2 Ubuntu 20.04.6 LTS (Focal Fossa) CPU: (2) x64 AMD EPYC 7763 64-Core Processor Memory: 4.20 GB / 7.74 GB Container: Yes Shell: 5.0.17 - /bin/bash Binaries: Node: 20.11.0 - ~/nvm/current/bin/node Yarn: 1.22.19 - /usr/bin/yarn npm: 10.2.4 - ~/nvm/current/bin/npm pnpm: 8.15.1 - ~/nvm/current/bin/pnpm
Describe the bug
Cannot find module 'novel/extensions' or its corresponding type declarations.![image](https://github.com/steven-tey/novel/assets/16734453/59d3454b-e641-4960-a904-cf9253a11a5d)
Link to reproduction
any
To reproduce
After installation packages
Additional information