-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#20 noblog / pluginエラー #27
Comments
- tiptapの問題? - とりあえず npm install tiptap を実行
- tiptapの問題? - とりあえず npm install tiptap を実行
脆弱性の直し方: 手動で npm audit fix
参考package-lockをチョクで直す fast-xml-parser現状1
対策1package-lock.jsonを書き換え "node_modules/ogp-parser": {
"version": "0.8.1",
"resolved": "https://registry.npmjs.org/ogp-parser/-/ogp-parser-0.8.1.tgz",
"integrity": "sha512-sqBbX6BBX9YlwK5UL8qreV/mts2jKtmHlNJ6cMVLEA59BYuaWCToieUmWg+wxpxZoeCg+pbxWcd5r8wVtstB3g==",
"dependencies": {
"cheerio": "^1.0.0-rc.12",
"fast-xml-parser": "^3.16.0", // ←OLD
"fast-xml-parser": "^4.2.4", // ←NEW ここの行を書き換えただけ。
"he": "^1.2.0",
"iconv-lite": "0.5.1",
"jschardet": "2.1.1"
} node_modulesフォルダの削除後、以下を実行
結果1
simple-update-notifier現状2
長いがビビることなかれ。 対策2 "node_modules/simple-update-notifier": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz",
"integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==",
"dev": true,
"dependencies": {
"semver": "~7.0.0" // ←OLD
"semver": "^7.5.2" // ←NEW この行を変えるだけ
},
"engines": {
"node": ">=8.10.0"
}
}, package-lock.jsonで 結果2
しかし、Netlifyのエラーは消えなかった→ #29 → 解決した
|
|
エラーを追ってみたが、結局.envのところを設定しないと無りポそう NotionNOTION_PROFILE_PAGE_ID= AlgoliaNEXT_PUBLIC_ALGOLIA_APPLICATION_ID= |
tiptap/pm のバグ長い戦いだった。 先に結論以下にたどり着きました。
現象localでは発生しないが、netlifyにデプロイしたときにエラー発生
|
ローカルでエラー出ないが、なぜかnetrify上でエラーになった。 package.jsonのせいと思しき? > Internal Server Error
#20
└ #27
Netlify build error log
3:20:46 PM: Failed to compile.
3:20:46 PM:
3:20:46 PM: ./node_modules/@tiptap/core/dist/index.js
3:20:46 PM: Module not found: Can't resolve '@tiptap/pm/state'
3:20:46 PM: Import trace for requested module:
3:20:46 PM: ./node_modules/@tiptap/extension-placeholder/dist/index.js
3:20:46 PM: ./src/components/features/contact/ContactForm/ContactForm.tsx
3:20:46 PM: ./src/components/features/contact/ContactForm/index.ts
3:20:46 PM: ./src/components/@templates/ContactTemplate.tsx
3:20:46 PM: ./pages/contact.tsx
3:20:46 PM: https://nextjs.org/docs/messages/module-not-found
3:20:46 PM: ./node_modules/@tiptap/core/dist/index.js
3:20:46 PM: Module not found: Can't resolve '@tiptap/pm/view'
3:20:46 PM: Import trace for requested module:
3:20:46 PM: ./node_modules/@tiptap/extension-placeholder/dist/index.js
3:20:46 PM: ./src/components/features/contact/ContactForm/ContactForm.tsx
3:20:46 PM: ./src/components/features/contact/ContactForm/index.ts
3:20:46 PM: ./src/components/@templates/ContactTemplate.tsx
3:20:46 PM: ./pages/contact.tsx
3:20:46 PM: https://nextjs.org/docs/messages/module-not-found
3:20:46 PM: ./node_modules/@tiptap/core/dist/index.js
3:20:46 PM: Module not found: Can't resolve '@tiptap/pm/keymap'
3:20:46 PM: Import trace for requested module:
3:20:46 PM: ./node_modules/@tiptap/extension-placeholder/dist/index.js
3:20:46 PM: ./src/components/features/contact/ContactForm/ContactForm.tsx
3:20:46 PM: ./src/components/features/contact/ContactForm/index.ts
3:20:46 PM: ./src/components/@templates/ContactTemplate.tsx
3:20:46 PM: ./pages/contact.tsx
3:20:46 PM: https://nextjs.org/docs/messages/module-not-found
3:20:46 PM: ./node_modules/@tiptap/core/dist/index.js
3:20:46 PM: Module not found: Can't resolve '@tiptap/pm/model'
3:20:46 PM: Import trace for requested module:
3:20:46 PM: ./node_modules/@tiptap/extension-placeholder/dist/index.js
3:20:46 PM: ./src/components/features/contact/ContactForm/ContactForm.tsx
3:20:46 PM: ./src/components/features/contact/ContactForm/index.ts
3:20:46 PM: ./src/components/@templates/ContactTemplate.tsx
3:20:46 PM: ./pages/contact.tsx
3:20:46 PM: https://nextjs.org/docs/messages/module-not-found
3:20:46 PM: ./node_modules/@tiptap/core/dist/index.js
3:20:46 PM: Module not found: Can't resolve '@tiptap/pm/transform'
3:20:46 PM: Import trace for requested module:
3:20:46 PM: ./node_modules/@tiptap/extension-placeholder/dist/index.js
3:20:46 PM: ./src/components/features/contact/ContactForm/ContactForm.tsx
3:20:46 PM: ./src/components/features/contact/ContactForm/index.ts
3:20:46 PM: ./src/components/@templates/ContactTemplate.tsx
3:20:46 PM: ./pages/contact.tsx
3:20:46 PM: https://nextjs.org/docs/messages/module-not-found
3:20:46 PM: > Build failed because of webpack errors
3:20:46 PM:
3:20:46 PM: build.command failed
3:20:46 PM: ────────────────────────────────────────────────────────────────
3:20:46 PM:
3:20:46 PM: Error message
3:20:46 PM: Command failed with exit code 1: npm run build (https://ntl.fyi/exit-code-1)
3:20:46 PM:
3:20:46 PM: Error location
3:20:46 PM: In Build command from Netlify app:
3:20:46 PM: npm run build
3:20:46 PM:
3:20:46 PM: Resolved config
3:20:46 PM: build:
3:20:46 PM: command: npm run build
3:20:46 PM: commandOrigin: ui
3:20:46 PM: environment:
3:20:46 PM: - NEXT_PUBLIC_GTM_ID
3:20:46 PM: - NOTION_DATABASE
3:20:46 PM: - NOTION_TOKEN
3:20:46 PM: - REVIEW_ID
3:20:46 PM: - NEXT_PRIVATE_TARGET
3:20:46 PM: publish: /opt/build/repo/.next
3:20:46 PM: publishOrigin: ui
3:20:46 PM: plugins:
3:20:46 PM: - inputs: {}
3:20:46 PM: origin: ui
3:20:46 PM: package: '@netlify/plugin-nextjs'
3:20:47 PM: Caching artifacts
3:20:47 PM: Started saving node modules
3:20:47 PM: Finished saving node modules
3:20:47 PM: Started saving build plugins
3:20:47 PM: Finished saving build plugins
3:20:47 PM: Started saving corepack cache
3:20:47 PM: Finished saving corepack cache
3:20:47 PM: Started saving yarn cache
3:20:53 PM: Finished saving yarn cache
3:20:53 PM: Started saving pip cache
3:20:53 PM: Finished saving pip cache
3:20:53 PM: Started saving emacs cask dependencies
3:20:53 PM: Finished saving emacs cask dependencies
3:20:53 PM: Started saving maven dependencies
3:20:53 PM: Finished saving maven dependencies
3:20:53 PM: Started saving boot dependencies
3:20:53 PM: Finished saving boot dependencies
3:20:53 PM: Started saving rust rustup cache
3:20:53 PM: Finished saving rust rustup cache
3:20:53 PM: Started saving go dependencies
3:20:54 PM: Finished saving go dependencies
3:20:56 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
3:20:56 PM: Failing build: Failed to build site
3:20:56 PM: Finished processing build request in 2m12.125s
The text was updated successfully, but these errors were encountered: