blocklet next dapp 执行bundle 报错
hiker@MacBook-Pro blocklet-demo % pnpm bundle > blocklet-demo@0.1.0 bundle /Users/hiker/demo/blocklet-demo > npm run bundle:client && npm run bundle:api > blocklet-demo@0.1.0 bundle:client > PUBLIC_URL='/.blocklet/proxy/z2qaBuPBUjx4ysBgFS3NWs3Z91J5LPddyg1GL' next build ▲ Next.js 14.2.4 - Environments: .env ✓ Linting and checking validity of types Creating an optimized production build ... ✓ Compiled successfully ✓ Collecting page data ✓ Generating static pages (3/3) ✓ Collecting build traces ✓ Finalizing page optimization Route (pages) Size First Load JS ┌ ○ / 4.73 kB 83.8 kB ├ └ css/f7bac67f9d9badbc.css 657 B ├ /_app 0 B 79.1 kB ├ ○ /404 180 B 79.3 kB └ ƒ /api/hello 0 B 79.1 kB + First Load JS shared by all 79.3 kB ├ chunks/framework-4b14d76c1e57931c.js 45.2 kB ├ chunks/main-2c9383dc8ceeae41.js 32 kB └ other shared chunks (total) 2.12 kB ○ (Static) prerendered as static content ƒ (Dynamic) server-rendered on demand > blocklet-demo@0.1.0 bundle:api > npm run clean && blocklet bundle --compact --create-release > blocklet-demo@0.1.0 clean > node scripts/build-clean.mjs clean .blocklet folder clean .blocklet folder done! blocklet bundle v1.16.28 ℹ Bundling in compact mode for blocklet z2qaBuPBUjx4ysBgFS3NWs3Z91J5LPddyg1GL... ↑ Creating blocklet bundle in .blocklet/bundle...⚠ No screenshots found! ✔ Creating blocklet bundle in .blocklet/bundle... Done in 1.408s ⧇ bundle single file in .blocklet/bundle...ℹ Extra script file detected for bundling api/hooks/pre-start.js ✖ bundle single file in .blocklet/bundle... Fail after 41.434s Module not found: Error: Package path ./server.edge is not exported from package /Users/hiker/demo/blocklet-demo/node_modules/.pnpm/next@14.2.4_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-dom (see exports field in /Users/hiker/demo/blocklet-demo/node_modules/.pnpm/next@14.2.4_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-dom/package.json) Did you mean './react-dom/server.edge'? Requests that should resolve in the current directory need to start with './'. Requests that start with a name are treated as module requests and resolve within module directories (node_modules). If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too. Module not found: Error: Package path ./static.edge is not exported from package /Users/hiker/demo/blocklet-demo/node_modules/.pnpm/next@14.2.4_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-dom (see exports field in /Users/hiker/demo/blocklet-demo/node_modules/.pnpm/next@14.2.4_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-dom/package.json) Did you mean './react-dom/static.edge'? Requests that should resolve in the current directory need to start with './'. Requests that start with a name are treated as module requests and resolve within module directories (node_modules). If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too. Module not found: Error: Package path ./server.edge is not exported from package /Users/hiker/demo/blocklet-demo/node_modules/.pnpm/next@14.2.4_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-dom (see exports field in /Users/hiker/demo/blocklet-demo/node_modules/.pnpm/next@14.2.4_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-dom/package.json) Did you mean './react-dom/server.edge'? Requests that should resolve in the current directory need to start with './'. Requests that start with a name are treated as module requests and resolve within module directories (node_modules). If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too. Module not found: Error: Package path ./server-rendering-stub is not exported from package /Users/hiker/demo/blocklet-demo/node_modules/.pnpm/next@14.2.4_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-dom (see exports field in /Users/hiker/demo/blocklet-demo/node_modules/.pnpm/next@14.2.4_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-dom/package.json) Did you mean './react-dom/server-rendering-stub'? Requests that should resolve in the current directory need to start with './'. Requests that start with a name are treated as module requests and resolve within module directories (node_modules). If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too. Module not found: Error: Package path ./server.edge is not exported from package /Users/hiker/demo/blocklet-demo/node_modules/.pnpm/next@14.2.4_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-dom (see exports field in /Users/hiker/demo/blocklet-demo/node_modules/.pnpm/next@14.2.4_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-dom/package.json) Did you mean './react-dom/server.edge'? Requests that should resolve in the current directory need to start with './'. Requests that start with a name are treated as module requests and resolve within module directories (node_modules). If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too. Error: Module not found: Error: Package path ./server.edge is not exported from package /Users/hiker/demo/blocklet-demo/node_modules/.pnpm/next@14.2.4_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-dom (see exports field in /Users/hiker/demo/blocklet-demo/node_modules/.pnpm/next@14.2.4_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-dom/package.json) Did you mean './react-dom/server.edge'? Requests that should resolve in the current directory need to start with './'. Requests that start with a name are treated as module requests and resolve within module directories (node_modules). If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too. Module not found: Error: Package path ./static.edge is not exported from package /Users/hiker/demo/blocklet-demo/node_modules/.pnpm/next@14.2.4_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-dom (see exports field in /Users/hiker/demo/blocklet-demo/node_modules/.pnpm/next@14.2.4_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-dom/package.json) Did you mean './react-dom/static.edge'? Requests that should resolve in the current directory need to start with './'. Requests that start with a name are treated as module requests and resolve within module directories (node_modules). If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too. Module not found: Error: Package path ./server.edge is not exported from package /Users/hiker/demo/blocklet-demo/node_modules/.pnpm/next@14.2.4_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-dom (see exports field in /Users/hiker/demo/blocklet-demo/node_modules/.pnpm/next@14.2.4_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-dom/package.json) Did you mean './react-dom/server.edge'? Requests that should resolve in the current directory need to start with './'. Requests that start with a name are treated as module requests and resolve within module directories (node_modules). If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too. Module not found: Error: Package path ./server-rendering-stub is not exported from package /Users/hiker/demo/blocklet-demo/node_modules/.pnpm/next@14.2.4_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-dom (see exports field in /Users/hiker/demo/blocklet-demo/node_modules/.pnpm/next@14.2.4_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-dom/package.json) Did you mean './react-dom/server-rendering-stub'? Requests that should resolve in the current directory need to start with './'. Requests that start with a name are treated as module requests and resolve within module directories (node_modules). If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too. Module not found: Error: Package path ./server.edge is not exported from package /Users/hiker/demo/blocklet-demo/node_modules/.pnpm/next@14.2.4_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-dom (see exports field in /Users/hiker/demo/blocklet-demo/node_modules/.pnpm/next@14.2.4_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-dom/package.json) Did you mean './react-dom/server.edge'? Requests that should resolve in the current directory need to start with './'. Requests that start with a name are treated as module requests and resolve within module directories (node_modules). If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too. at /Users/hiker/Library/pnpm/global/5/.pnpm/@vercel+ncc@0.38.1/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:38:1896272 at /Users/hiker/Library/pnpm/global/5/.pnpm/@vercel+ncc@0.38.1/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:38:396262 at _done (eval at create (/Users/hiker/Library/pnpm/global/5/.pnpm/@vercel+ncc@0.38.1/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:21:75523), <anonymous>:9:1) at eval (eval at create (/Users/hiker/Library/pnpm/global/5/.pnpm/@vercel+ncc@0.38.1/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:21:75523), <anonymous>:34:22) ELIFECYCLE Command failed with exit code 1. hiker@MacBook-Pro blocklet-demo %
1 reply
目前对 nextjs 的支持还不太友好,持续改进中