avitorio / outstatic

Outstatic - A static CMS for Next.js
https://Outstatic.com
MIT License
2.67k stars 157 forks source link

'isMacOS' is not exported from '@tiptap/core' #121

Closed ashtonlance closed 1 year ago

ashtonlance commented 1 year ago

Provide environment information

"outstatic": "^0.0.39", "next": "^13.4.8", "react": "^18.2.0",

Next App Router

What browser are you using? (if relevant)

Chrome

How are you deploying your application? (if relevant)

Vercel

Describe the Bug

I followed the steps in the doc to add Outstatic to a Next.js application. As soon as I visit localhost:3000/outstatic, I'm greeted with this error

- error ./node_modules/.pnpm/@tiptap+extension-strike@2.1.6_@tiptap+core@2.0.0-beta.202/node_modules/@tiptap/extension-strike/dist/index.js
Attempted import error: 'isMacOS' is not exported from '@tiptap/core' (imported as 'isMacOS').

Import trace for requested module:
./node_modules/.pnpm/@tiptap+extension-strike@2.1.6_@tiptap+core@2.0.0-beta.202/node_modules/@tiptap/extension-strike/dist/index.js
./node_modules/.pnpm/@tiptap+starter-kit@2.0.0-beta.202_@tiptap+pm@2.1.6/node_modules/@tiptap/starter-kit/dist/tiptap-starter-kit.esm.js
./node_modules/.pnpm/outstatic@0.0.39_@tiptap+extension-code-block@2.1.6_@tiptap+pm@2.1.6_@types+react@18.2.14_nex_nbtnmmxkyd4lxbqngd5ca22z5i/node_modules/outstatic/dist/index.js
- wait compiling /_error (client and server)...
- error ./node_modules/.pnpm/@tiptap+extension-strike@2.1.6_@tiptap+core@2.0.0-beta.202/node_modules/@tiptap/extension-strike/dist/index.js
Attempted import error: 'isMacOS' is not exported from '@tiptap/core' (imported as 'isMacOS').

Import trace for requested module:
./node_modules/.pnpm/@tiptap+extension-strike@2.1.6_@tiptap+core@2.0.0-beta.202/node_modules/@tiptap/extension-strike/dist/index.js
./node_modules/.pnpm/@tiptap+starter-kit@2.0.0-beta.202_@tiptap+pm@2.1.6/node_modules/@tiptap/starter-kit/dist/tiptap-starter-kit.esm.js
./node_modules/.pnpm/outstatic@0.0.39_@tiptap+extension-code-block@2.1.6_@tiptap+pm@2.1.6_@types+react@18.2.14_nex_nbtnmmxkyd4lxbqngd5ca22z5i/node_modules/outstatic/dist/index.js

Expected Behavior

I'd expect the admin panel to load as intended

Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster

/

To Reproduce

Install in a new Next application and visit /outstatic

image
avitorio commented 1 year ago

Hey @ashtonlance, thanks for flagging it! Can you create a minimal repo with the issue and link it here? Cheers!

avitorio commented 1 year ago

I just tried installing outstatic on a new nextjs install with:

npx create-next-app@latest npm add outstatic npm add @tiptap/pm

Following the creation of /pages/outstatic/[[...ost]].tsx and /pages/api/outstatic/[[...ost]].tsx as explained in the docs, and I can access the admin page.

A minimal repo reproducing the error would be helpful, or perhaps your package.json contents.

avitorio commented 1 year ago

@ashtonlance Any updates here?

avitorio commented 1 year ago

Hey @ashtonlance I accidentally was able to replicate this. It seems the error only occurs when using pnpm. If you install using npm or yarn the package should load fine. I'm investigating this issue with pnpm.

You may need to delete node_modules and reinstall using npm or yarn.

avitorio commented 1 year ago

Hey @ashtonlance quick update. This is fixed in v0.0.41. You can install outstatic@0.0.41. In the new version you don't need to install @tiptap/pm, so you can remove it from your package.json.

Let me know if this works! Thanks for flagging this issue!

ashtonlance commented 1 year ago

@avitorio Aha! That seems to have cleared it up. Sorry for the slow response, got a bunch of irons in the fire.