You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
✘ [ERROR] Could not resolve "next/router"
node_modules/@toss/use-funnel/esm/useFunnel.mjs:7:26:
7 │ import { useRouter } from 'next/router';
╵ ~~~~~~~~~~~~~
You can mark the path "next/router" as external to exclude it from the bundle, which will remove
this error.
✘ [ERROR] Could not resolve "react-query"
node_modules/@toss/use-funnel/esm/useFunnel.mjs:9:25:
9 │ import { useQuery } from 'react-query';
╵ ~~~~~~~~~~~~~
You can mark the path "react-query" as external to exclude it from the bundle, which will remove
this error.
✘ [ERROR] Could not resolve "next/router"
node_modules/@toss/use-query-param/esm/hooks/useNextRouter.mjs:1:26:
1 │ import { useRouter } from 'next/router';
╵ ~~~~~~~~~~~~~
You can mark the path "next/router" as external to exclude it from the bundle, which will remove
this error.
✘ [ERROR] Could not resolve "next/router"
node_modules/@toss/use-query-param/esm/utils/waitForRouterReady.mjs:1:19:
1 │ import Router from 'next/router';
╵ ~~~~~~~~~~~~~
You can mark the path "next/router" as external to exclude it from the bundle, which will remove
this error.
/workspaces/workspace/node_modules/esbuild/lib/main.js:1639
let error = new Error(`${text}${summary}`);
^
Error: Build failed with 4 errors:
node_modules/@toss/use-funnel/esm/useFunnel.mjs:7:26: ERROR: Could not resolve "next/router"
node_modules/@toss/use-funnel/esm/useFunnel.mjs:9:25: ERROR: Could not resolve "react-query"
node_modules/@toss/use-query-param/esm/hooks/useNextRouter.mjs:1:26: ERROR: Could not resolve "next/router"
node_modules/@toss/use-query-param/esm/utils/waitForRouterReady.mjs:1:19: ERROR: Could not resolve "next/router"
at failureErrorWithLog (/workspaces/workspace/node_modules/esbuild/lib/main.js:1639:15)
at /workspaces/workspace/node_modules/esbuild/lib/main.js:1051:25
at /workspaces/workspace/node_modules/esbuild/lib/main.js:1515:9
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
errors: [
{
detail: undefined,
id: '',
location: {
column: 26,
file: 'node_modules/@toss/use-funnel/esm/useFunnel.mjs',
length: 13,
line: 7,
lineText: "import { useRouter } from 'next/router';",
namespace: '',
suggestion: ''
},
notes: [
{
location: null,
text: 'You can mark the path "next/router" as external to exclude it from the bundle, which will remove this error.'
}
],
pluginName: '',
text: 'Could not resolve "next/router"'
},
{
detail: undefined,
id: '',
location: {
column: 25,
file: 'node_modules/@toss/use-funnel/esm/useFunnel.mjs',
length: 13,
line: 9,
lineText: "import { useQuery } from 'react-query';",
namespace: '',
suggestion: ''
},
notes: [
{
location: null,
text: 'You can mark the path "react-query" as external to exclude it from the bundle, which will remove this error.'
}
],
pluginName: '',
text: 'Could not resolve "react-query"'
},
{
detail: undefined,
id: '',
location: {
column: 26,
file: 'node_modules/@toss/use-query-param/esm/hooks/useNextRouter.mjs',
length: 13,
line: 1,
lineText: "import { useRouter } from 'next/router';",
namespace: '',
suggestion: ''
},
notes: [
{
location: null,
text: 'You can mark the path "next/router" as external to exclude it from the bundle, which will remove this error.'
}
],
pluginName: '',
text: 'Could not resolve "next/router"'
},
{
detail: undefined,
id: '',
location: {
column: 19,
file: 'node_modules/@toss/use-query-param/esm/utils/waitForRouterReady.mjs',
length: 13,
line: 1,
lineText: "import Router from 'next/router';",
namespace: '',
suggestion: ''
},
notes: [
{
location: null,
text: 'You can mark the path "next/router" as external to exclude it from the bundle, which will remove this error.'
}
],
pluginName: '',
text: 'Could not resolve "next/router"'
}
],
warnings: []
}
Expected behavior
To Reproduce
Possible Solution
문제 분석
package-lock을 확인하니 "next": "^11.1 || ^12 || ^13", 구문으로 인해 최신 ^13 이 install 됩니다.
next13 app dir 버전에서 router 부분이 변경되어 발생된 이슈로 보입니다.
Package Scope
Package name: @toss/use-funnel
Describe the bug
에러 로그
Expected behavior
To Reproduce
Possible Solution
문제 분석
package-lock
을 확인하니"next": "^11.1 || ^12 || ^13",
구문으로 인해 최신 ^13 이 install 됩니다.next13 app dir 버전에서 router 부분이 변경되어 발생된 이슈로 보입니다.
next
를 보니[email protected]
으로 설치된 것으로 확인되었습니다.제안
=> nextjs 가 아닌 react 기반 환경에서도 에러가 발생함
Additional context
The text was updated successfully, but these errors were encountered: