@evjs/create-app 0.0.21 → 0.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ program
30
30
  { title: "Basic CSR (Client-Side Rendering)", value: "basic-csr" },
31
31
  { title: "Basic Server Functions", value: "basic-server-fns" },
32
32
  {
33
- title: "Basic Server Routes (Programmatic REST API via route())",
33
+ title: "Basic Server Routes (Programmatic REST API via createRoute())",
34
34
  value: "basic-server-routes",
35
35
  },
36
36
  {
@@ -59,7 +59,13 @@ program
59
59
  console.error(pc.red(`✖ Directory ${projectName} already exists!`));
60
60
  process.exit(1);
61
61
  }
62
- const templateDir = path.resolve(__dirname, "../templates", template);
62
+ const templatesRoot = path.resolve(__dirname, "../templates");
63
+ const templateDir = path.resolve(templatesRoot, template);
64
+ // Prevent path traversal outside the templates directory
65
+ if (!templateDir.startsWith(templatesRoot + path.sep)) {
66
+ console.error(pc.red(`✖ Invalid template: ${template}`));
67
+ process.exit(1);
68
+ }
63
69
  if (!fs.existsSync(templateDir)) {
64
70
  console.error(pc.red(`✖ Template ${template} not found!`));
65
71
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evjs/create-app",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "description": "Scaffold a new evjs project",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "example-basic-csr",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "npx ev dev",
@@ -19,7 +19,7 @@ npm run start -w example-basic-fns-ecma
19
19
  | `src/main.tsx` | App bootstrap |
20
20
  | `src/routes.tsx` | Routes + components |
21
21
  | `src/api/messages.server.ts` | Server functions |
22
- | `ev.config.ts` | Uses `@evjs/server/ecma` runtime |
22
+ | `server.entry.mjs` | Custom ECMA server entry using `@evjs/server/ecma` runtime |
23
23
 
24
24
  ## What It Demonstrates
25
25
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "example-basic-fns-ecma",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "npx ev dev",
@@ -1,3 +1,4 @@
1
+ import { utoopack } from "@evjs/bundler-utoopack";
1
2
  import { webpack } from "@evjs/bundler-webpack";
2
3
  import { defineConfig } from "@evjs/ev";
3
4
 
@@ -5,7 +6,7 @@ import { defineConfig } from "@evjs/ev";
5
6
  * Example: evjs plugin system.
6
7
  *
7
8
  * Demonstrates all available plugin hooks:
8
- * - `bundler` — modify the underlying bundler config (type-safe via helpers)
9
+ * - `bundlerConfig` — modify the underlying bundler config (type-safe via webpack() or utoopack() helpers)
9
10
  * - `buildStart` — run logic before compilation begins
10
11
  * - `buildEnd` — run logic after compilation completes
11
12
  * - `transformHtml` — modify the output HTML document after asset injection
@@ -24,13 +25,23 @@ export default defineConfig({
24
25
  console.log("[example-txt-plugin] build starting...");
25
26
  },
26
27
 
27
- // Type-safe webpack config mutation via the webpack() helper
28
- bundler: webpack((config) => {
29
- config.module?.rules?.push({
30
- test: /\.txt$/,
31
- use: "raw-loader",
32
- });
33
- }),
28
+ // Type-safe bundler config mutation via helpers.
29
+ // These hooks only run when the corresponding bundler is active.
30
+ bundlerConfig(config, ctx) {
31
+ webpack((cfg) => {
32
+ cfg.module?.rules?.push({
33
+ test: /\.txt$/,
34
+ use: "raw-loader",
35
+ });
36
+ })(config, ctx);
37
+
38
+ utoopack((cfg) => {
39
+ // Add custom loaders or rules to utoopack
40
+ cfg.module ??= {};
41
+ cfg.module.rules ??= {};
42
+ cfg.module.rules[".txt"] = { type: "raw" };
43
+ })(config, ctx);
44
+ },
34
45
 
35
46
  buildEnd(result) {
36
47
  console.log(
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "example-basic-plugins",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "npx ev dev",
@@ -21,4 +21,4 @@ npm run dev -w example-basic-server-fns
21
21
  - `"use server"` directive for auto-discovered server functions
22
22
  - `useQuery(getUsers)` for type-safe data fetching
23
23
  - `useMutation({ mutationFn: createUser })` for mutations
24
- - `getUsers.queryKey()` for cache invalidation
24
+ - `getFnQueryKey(getUsers)` for cache invalidation
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "example-basic-server-fns",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "npx ev dev",
@@ -9,6 +9,10 @@ import { useState } from "react";
9
9
  import { createUser, getUsers } from "../api/users.server";
10
10
  import { rootRoute } from "./__root";
11
11
 
12
+ console.log("***** ", getUsers, createUser);
13
+
14
+ Object.assign(window, { getUsers, createUser });
15
+
12
16
  function UsersPage() {
13
17
  const [name, setName] = useState("");
14
18
  const [email, setEmail] = useState("");
@@ -1,6 +1,6 @@
1
1
  # basic-server-routes
2
2
 
3
- Programmatic REST route handlers using `route()`.
3
+ Programmatic REST route handlers using `createRoute()`.
4
4
 
5
5
  ## Run
6
6
 
@@ -18,7 +18,7 @@ npm run dev -w example-basic-server-routes
18
18
 
19
19
  ## What It Demonstrates
20
20
 
21
- - `route(path, { GET, POST, PUT, DELETE })` for REST endpoints
21
+ - `createRoute(path, { GET, POST, PUT, DELETE })` for REST endpoints
22
22
  - Dynamic route params (`:id`)
23
23
  - Query string parsing (`?limit=N`)
24
24
  - Custom status codes (201, 204, 404)
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "example-basic-server-routes",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "npx ev dev",
@@ -4,9 +4,9 @@
4
4
  * Demonstrates a minimal single-method route handler.
5
5
  */
6
6
 
7
- import { route } from "@evjs/server";
7
+ import { createRoute } from "@evjs/server";
8
8
 
9
- export const healthHandler = route("/api/health", {
9
+ export const healthHandler = createRoute("/api/health", {
10
10
  GET: async () => {
11
11
  return Response.json({
12
12
  status: "ok",
@@ -8,7 +8,7 @@
8
8
  * - Custom status codes
9
9
  */
10
10
 
11
- import { route } from "@evjs/server";
11
+ import { createRoute } from "@evjs/server";
12
12
 
13
13
  /** Simulated post database. */
14
14
  interface Post {
@@ -36,7 +36,7 @@ const posts: Post[] = [
36
36
  let nextId = 3;
37
37
 
38
38
  /** List + Create posts. */
39
- export const postsHandler = route("/api/posts", {
39
+ export const postsHandler = createRoute("/api/posts", {
40
40
  GET: async (req) => {
41
41
  // Support ?limit query param
42
42
  const url = new URL(req.url);
@@ -70,7 +70,7 @@ export const postsHandler = route("/api/posts", {
70
70
  });
71
71
 
72
72
  /** Get, Update, Delete a single post. */
73
- export const postHandler = route("/api/posts/:id", {
73
+ export const postHandler = createRoute("/api/posts/:id", {
74
74
  GET: async (_req, ctx) => {
75
75
  const id = ctx.req.param("id");
76
76
  const post = posts.find((p) => p.id === id);
@@ -5,7 +5,7 @@ function Root() {
5
5
  <div style={{ fontFamily: "system-ui, sans-serif", padding: "1rem" }}>
6
6
  <h1>Route Handlers Example</h1>
7
7
  <p style={{ color: "#666" }}>
8
- REST endpoints powered by <code>route()</code>
8
+ REST endpoints powered by <code>createRoute()</code>
9
9
  </p>
10
10
  <Outlet />
11
11
  </div>
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "example-complex-routing",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "npx ev dev",
@@ -19,7 +19,7 @@ npm run dev -w example-configured-server-fns
19
19
  ## What It Demonstrates
20
20
 
21
21
  - `ev.config.ts` with `defineConfig` for custom ports
22
- - Plugin with `setup()` → `bundler: webpack(...)` for type-safe webpack config
22
+ - Plugin with `setup()` → `bundler: utoopack(...)` for type-safe bundler config
23
23
  - `useQuery(getUsers)` for fetching data with auto-generated keys
24
- - `useMutation({ mutationFn })` with `getUsers.queryKey()` for cache invalidation
24
+ - `useMutation({ mutationFn })` with `getFnQueryKey(getUsers)` for cache invalidation
25
25
  - Direct mutation args: `mutate({ name, email })` (not array-wrapped)
@@ -4,7 +4,7 @@ import { defineConfig } from "@evjs/ev";
4
4
  * Advanced ev.config.ts example.
5
5
  *
6
6
  * This file demonstrates the available configuration options.
7
- * All fields are optional — evjs works out of the box.
7
+ * All fields are optional — evjs works out of the box with utoopack.
8
8
  */
9
9
  export default defineConfig({
10
10
  // Client entry point (default: "./src/main.tsx")
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "example-configured-server-fns",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "npx ev dev",
@@ -19,6 +19,6 @@ npm run dev -w example-server-fns-query
19
19
  ## What It Demonstrates
20
20
 
21
21
  - `useQuery(getUsers)` / `useMutation({ mutationFn })` with auto-generated query keys
22
- - `getUsers.queryKey()` for cache invalidation on mutation success
22
+ - `getFnQueryKey(getUsers)` for cache invalidation on mutation success
23
23
  - Multi-arg server functions: `useQuery(searchUsers, name, email)`
24
24
  - Error handling with `ServerFunctionError`
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "example-server-fns-query",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "npx ev dev",
@@ -23,4 +23,4 @@ npm run dev -w example-sqlite-server-fns
23
23
  - Multi-table relationships (users → todos)
24
24
  - `useQuery(getUsers)` / `useMutation({ mutationFn })` with auto-generated query keys
25
25
  - Direct mutation args: `mutate(id)`, `mutate({ name, email })`
26
- - `getUsers.queryKey()` for cache invalidation
26
+ - `getFnQueryKey(getUsers)` for cache invalidation
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "example-sqlite-server-fns",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "npx ev dev",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "example-trpc-server-fns",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "npx ev dev",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "example-websocket-fns",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "npx ev dev",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "example-with-tailwind",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "npx ev dev",
@@ -1,248 +0,0 @@
1
-
2
- > example-basic-server-fns@0.0.0 dev
3
- > ev dev
4
-
5
- 11:30:23.781 INF evjs·cli Using 'convention-based defaults'
6
- 11:30:23.847 INF evjs·cli Starting development server...
7
- <w> [webpack-dev-server] "hot: true" automatically applies HMR plugin, you don't have to add it manually to your webpack configuration.
8
- <i> [webpack-dev-server] [HPM] Proxy created: /api -> http://localhost:3001
9
- <i> [webpack-dev-server] Project is running at:
10
- <i> [webpack-dev-server] Loopback: http://localhost:3000/, http://[::1]:3000/
11
- <i> [webpack-dev-server] On Your Network (IPv4): http://30.230.67.161:3000/
12
- <i> [webpack-dev-server] On Your Network (IPv6): http://[fd00:1:1001:3300:403f:c64:3d22:618]:3000/
13
- <i> [webpack-dev-server] Content not from webpack is served from '/Users/xusd320/Codes/github/evjs/examples/basic-server-fns/public' directory
14
- 11:30:24.394 INF evjs·cli Server bundle detected, starting 'node' API...
15
- assets by path ../ 37.4 KiB
16
- asset ../server/main.js 36.8 KiB [compared for emit] 1 related asset
17
- asset ../manifest.json 556 bytes [compared for emit]
18
- asset index.js 1.81 MiB [compared for emit] (name: main) 1 related asset
19
- asset index.html 292 bytes [compared for emit]
20
- orphan modules 199 KiB [orphan] 41 modules
21
- runtime modules 28.1 KiB 13 modules
22
- modules by path ../../node_modules/ 1.57 MiB 116 modules
23
- modules by path ../../packages/ 13 KiB
24
- modules by path ../../packages/client/esm/*.js 10.8 KiB
25
- ../../packages/client/esm/index.js 1000 bytes [built] [code generated]
26
- + 5 modules
27
- modules by path ../../packages/shared/esm/*.js 2.25 KiB
28
- ../../packages/shared/esm/index.js 316 bytes [built] [code generated]
29
- ../../packages/shared/esm/constants.js 309 bytes [built] [code generated]
30
- + 2 modules
31
- modules by path ./src/ 15.3 KiB
32
- ./src/main.tsx 151 bytes [built] [code generated]
33
- ./src/routes.tsx 14.3 KiB [built] [code generated]
34
- ./src/api/users.server.ts 889 bytes [built] [code generated]
35
- client (webpack 5.105.4) compiled successfully in 343 ms
36
- [SERVER_TRACE] Request hit: http://localhost:3001/api/fn POST
37
- [SERVER_TRACE] Parsing JSON...
38
- [SERVER_TRACE] Parsed successfully: test
39
- [SERVER_TRACE] Dispatching: test
40
- [SERVER_TRACE] Dispatch returned!
41
- assets by status 37.1 KiB [cached] 2 assets
42
- assets by status 1.81 MiB [emitted]
43
- assets by path *.js 1.81 MiB
44
- asset index.js 1.81 MiB [emitted] (name: main) 1 related asset
45
- asset main.f0309d981bf523e0dc6b.hot-update.js 369 bytes [emitted] [immutable] [hmr] (name: main) 1 related asset
46
- asset ../manifest.json 644 bytes [emitted]
47
- asset main.f0309d981bf523e0dc6b.hot-update.json 28 bytes [emitted] [immutable] [hmr]
48
- Entrypoint main 1.81 MiB (1.97 MiB) = index.js 1.81 MiB main.f0309d981bf523e0dc6b.hot-update.js 369 bytes 2 auxiliary assets
49
- cached modules 1.79 MiB [cached] 170 modules
50
- runtime modules 28.1 KiB 13 modules
51
- client (webpack 5.105.4) compiled successfully in 68 ms
52
- assets by status 292 bytes [cached] 1 asset
53
- assets by path *.js 1.81 MiB
54
- asset index.js 1.81 MiB [emitted] (name: main) 1 related asset
55
- asset main.c8cca34a363f98cff40e.hot-update.js 369 bytes [emitted] [immutable] [hmr] (name: main) 1 related asset
56
- assets by path ../ 38.3 KiB
57
- asset ../server/main.js 37.6 KiB [emitted] 1 related asset
58
- asset ../manifest.json 681 bytes [emitted]
59
- asset main.c8cca34a363f98cff40e.hot-update.json 28 bytes [emitted] [immutable] [hmr]
60
- Entrypoint main 1.81 MiB (1.97 MiB) = index.js 1.81 MiB main.c8cca34a363f98cff40e.hot-update.js 369 bytes 2 auxiliary assets
61
- cached modules 1.79 MiB [cached] 170 modules
62
- runtime modules 28.1 KiB 13 modules
63
- client (webpack 5.105.4) compiled successfully in 52 ms
64
- Restarting '/Users/xusd320/Codes/github/evjs/examples/basic-server-fns/dist/server/_dev_start.cjs'
65
- assets by status 1.84 MiB [cached] 3 assets
66
- asset ../manifest.json 667 bytes [emitted]
67
- cached modules 1.79 MiB (javascript) 28.1 KiB (runtime) [cached] 183 modules
68
- client (webpack 5.105.4) compiled successfully in 29 ms
69
- assets by status 292 bytes [cached] 1 asset
70
- assets by path *.js 1.81 MiB
71
- asset index.js 1.81 MiB [emitted] (name: main) 1 related asset
72
- asset main.3e842c143c5b24617c4b.hot-update.js 369 bytes [emitted] [immutable] [hmr] (name: main) 1 related asset
73
- assets by path ../ 38.2 KiB
74
- asset ../server/main.js 37.5 KiB [emitted] 1 related asset
75
- asset ../manifest.json 755 bytes [emitted]
76
- asset main.3e842c143c5b24617c4b.hot-update.json 28 bytes [emitted] [immutable] [hmr]
77
- Entrypoint main 1.81 MiB (1.97 MiB) = index.js 1.81 MiB main.3e842c143c5b24617c4b.hot-update.js 369 bytes 2 auxiliary assets
78
- cached modules 1.79 MiB [cached] 170 modules
79
- runtime modules 28.1 KiB 13 modules
80
- client (webpack 5.105.4) compiled successfully in 48 ms
81
- Restarting '/Users/xusd320/Codes/github/evjs/examples/basic-server-fns/dist/server/_dev_start.cjs'
82
- assets by status 292 bytes [cached] 1 asset
83
- assets by path *.js 1.81 MiB
84
- asset index.js 1.81 MiB [emitted] (name: main) 1 related asset
85
- asset main.eebe779e480ccaf73117.hot-update.js 369 bytes [emitted] [immutable] [hmr] (name: main) 1 related asset
86
- assets by path ../ 38.5 KiB
87
- asset ../server/main.js 37.7 KiB [emitted] 1 related asset
88
- asset ../manifest.json 792 bytes [emitted]
89
- asset main.eebe779e480ccaf73117.hot-update.json 28 bytes [emitted] [immutable] [hmr]
90
- Entrypoint main 1.81 MiB (1.97 MiB) = index.js 1.81 MiB main.eebe779e480ccaf73117.hot-update.js 369 bytes 2 auxiliary assets
91
- cached modules 1.79 MiB [cached] 170 modules
92
- runtime modules 28.1 KiB 13 modules
93
- client (webpack 5.105.4) compiled successfully in 54 ms
94
- assets by status 1.84 MiB [cached] 3 assets
95
- asset ../manifest.json 778 bytes [emitted]
96
- cached modules 1.79 MiB (javascript) 28.1 KiB (runtime) [cached] 183 modules
97
- client (webpack 5.105.4) compiled successfully in 22 ms
98
- Restarting '/Users/xusd320/Codes/github/evjs/examples/basic-server-fns/dist/server/_dev_start.cjs'
99
- node:events:486
100
- throw er; // Unhandled 'error' event
101
- ^
102
-
103
- Error: listen EADDRINUSE: address already in use :::3001
104
- at Server.setupListenHandle [as _listen2] (node:net:1940:16)
105
- at listenInCluster (node:net:1997:12)
106
- at Server.listen (node:net:2102:7)
107
- at serve (file:///Users/xusd320/Codes/github/evjs/node_modules/@hono/node-server/dist/index.mjs:581:10)
108
- at serve (file:///Users/xusd320/Codes/github/evjs/packages/server/esm/environments/node.js:13:20)
109
- at Object.<anonymous> (/Users/xusd320/Codes/github/evjs/examples/basic-server-fns/dist/server/_dev_start.cjs:4:1)
110
- at Module._compile (node:internal/modules/cjs/loader:1761:14)
111
- at Object..js (node:internal/modules/cjs/loader:1893:10)
112
- at Module.load (node:internal/modules/cjs/loader:1481:32)
113
- at Module._load (node:internal/modules/cjs/loader:1300:12)
114
- Emitted 'error' event on Server instance at:
115
- at emitErrorNT (node:net:1976:8)
116
- at process.processTicksAndRejections (node:internal/process/task_queues:89:21) {
117
- code: 'EADDRINUSE',
118
- errno: -48,
119
- syscall: 'listen',
120
- address: '::',
121
- port: 3001
122
- }
123
-
124
- Node.js v24.12.0
125
- Failed running '/Users/xusd320/Codes/github/evjs/examples/basic-server-fns/dist/server/_dev_start.cjs'. Waiting for file changes before restarting...
126
- assets by status 38 KiB [cached] 2 assets
127
- assets by status 1.83 MiB [emitted]
128
- assets by path *.js 1.83 MiB
129
- asset index.js 1.81 MiB [emitted] (name: main) 1 related asset
130
- asset main.4d9c77c2cdfec106f1f4.hot-update.js 17.5 KiB [emitted] [immutable] [hmr] (name: main) 1 related asset
131
- asset ../manifest.json 866 bytes [emitted]
132
- asset main.4d9c77c2cdfec106f1f4.hot-update.json 28 bytes [emitted] [immutable] [hmr]
133
- Entrypoint main 1.83 MiB (1.97 MiB) = index.js 1.81 MiB main.4d9c77c2cdfec106f1f4.hot-update.js 17.5 KiB 2 auxiliary assets
134
- cached modules 1.78 MiB [cached] 169 modules
135
- runtime modules 28.1 KiB 13 modules
136
- ./src/routes.tsx 14.8 KiB [built] [code generated]
137
- client (webpack 5.105.4) compiled successfully in 62 ms
138
- assets by status 1.85 MiB [cached] 3 assets
139
- asset ../manifest.json 852 bytes [emitted]
140
- cached modules 1.79 MiB (javascript) 28.1 KiB (runtime) [cached] 181 modules
141
- javascript modules 1.53 KiB
142
- ../../packages/shared/esm/constants.js 309 bytes [built]
143
- ../../packages/shared/esm/errors.js 1.22 KiB [built]
144
- client (webpack 5.105.4) compiled successfully in 32 ms
145
- assets by status 1.85 MiB [cached] 3 assets
146
- asset ../manifest.json 889 bytes [emitted]
147
- cached modules 1.79 MiB (javascript) 28.1 KiB (runtime) [cached] 181 modules
148
- javascript modules 742 bytes
149
- ../../packages/shared/esm/index.js 316 bytes [built]
150
- ../../packages/shared/esm/http.js 426 bytes [built]
151
- client (webpack 5.105.4) compiled successfully in 26 ms
152
- assets by status 1.85 MiB [cached] 3 assets
153
- asset ../manifest.json 926 bytes [emitted]
154
- cached modules 1.79 MiB (javascript) 28.1 KiB (runtime) [cached] 182 modules
155
- ../../packages/client/esm/context.js 677 bytes [built]
156
- client (webpack 5.105.4) compiled successfully in 23 ms
157
- assets by status 1.85 MiB [cached] 3 assets
158
- asset ../manifest.json 963 bytes [emitted]
159
- cached modules 1.79 MiB (javascript) 28.1 KiB (runtime) [cached] 178 modules
160
- javascript modules 10.1 KiB
161
- ../../packages/client/esm/index.js 1000 bytes [built]
162
- ../../packages/client/esm/app.js 1.63 KiB [built]
163
- ../../packages/client/esm/transport.js 4.62 KiB [built]
164
- ../../packages/client/esm/query.js 2.14 KiB [built]
165
- ../../packages/client/esm/route.js 735 bytes [built]
166
- client (webpack 5.105.4) compiled successfully in 30 ms
167
- Restarting '/Users/xusd320/Codes/github/evjs/examples/basic-server-fns/dist/server/_dev_start.cjs'
168
- assets by status 1.85 MiB [cached] 3 assets
169
- asset ../manifest.json 1000 bytes [emitted]
170
- cached modules 1.8 MiB (javascript) 28.1 KiB (runtime) [cached] 183 modules
171
- client (webpack 5.105.4) compiled successfully in 24 ms
172
- assets by status 1.85 MiB [cached] 3 assets
173
- asset ../manifest.json 1.01 KiB [emitted]
174
- cached modules 1.8 MiB (javascript) 28.1 KiB (runtime) [cached] 183 modules
175
- client (webpack 5.105.4) compiled successfully in 27 ms
176
- <e> [webpack-dev-middleware] ModuleNotFoundError: Module not found: Error: Can't resolve '@evjs/server/register' in '/Users/xusd320/Codes/github/evjs/examples/basic-server-fns/src/api'
177
- <e> at /Users/xusd320/Codes/github/evjs/node_modules/webpack/lib/Compilation.js:2073:28
178
- <e> at /Users/xusd320/Codes/github/evjs/node_modules/webpack/lib/NormalModuleFactory.js:1041:13
179
- <e> at eval (eval at create (/Users/xusd320/Codes/github/evjs/node_modules/tapable/lib/HookCodeFactory.js:31:10), <anonymous>:10:1)
180
- <e> at /Users/xusd320/Codes/github/evjs/node_modules/webpack/lib/NormalModuleFactory.js:437:22
181
- <e> at eval (eval at create (/Users/xusd320/Codes/github/evjs/node_modules/tapable/lib/HookCodeFactory.js:31:10), <anonymous>:9:1)
182
- <e> at /Users/xusd320/Codes/github/evjs/node_modules/webpack/lib/NormalModuleFactory.js:622:22
183
- <e> at /Users/xusd320/Codes/github/evjs/node_modules/webpack/lib/NormalModuleFactory.js:181:10
184
- <e> at /Users/xusd320/Codes/github/evjs/node_modules/webpack/lib/NormalModuleFactory.js:894:25
185
- <e> at /Users/xusd320/Codes/github/evjs/node_modules/webpack/lib/NormalModuleFactory.js:1126:8
186
- <e> at /Users/xusd320/Codes/github/evjs/node_modules/webpack/lib/NormalModuleFactory.js:1255:5
187
- <e> resolve '@evjs/server/register' in '/Users/xusd320/Codes/github/evjs/examples/basic-server-fns/src/api'
188
- <e> Parsed request is a module
189
- <e> using description file: /Users/xusd320/Codes/github/evjs/examples/basic-server-fns/package.json (relative path: ./src/api)
190
- <e> Field 'browser' doesn't contain a valid alias configuration
191
- <e> resolve as module
192
- <e> /Users/xusd320/Codes/github/evjs/examples/basic-server-fns/src/api/node_modules doesn't exist or is not a directory
193
- <e> /Users/xusd320/Codes/github/evjs/examples/basic-server-fns/src/node_modules doesn't exist or is not a directory
194
- <e> /Users/xusd320/Codes/github/evjs/examples/basic-server-fns/node_modules doesn't exist or is not a directory
195
- <e> /Users/xusd320/Codes/github/evjs/examples/node_modules doesn't exist or is not a directory
196
- <e> looking for modules in /Users/xusd320/Codes/github/evjs/node_modules
197
- <e> existing directory /Users/xusd320/Codes/github/evjs/node_modules/@evjs/server
198
- <e> using description file: /Users/xusd320/Codes/github/evjs/node_modules/@evjs/server/package.json (relative path: .)
199
- <e> using exports field: ./esm/functions/register.js
200
- <e> using description file: /Users/xusd320/Codes/github/evjs/node_modules/@evjs/server/package.json (relative path: ./esm/functions/register.js)
201
- <e> no extension
202
- <e> Field 'browser' doesn't contain a valid alias configuration
203
- <e> /Users/xusd320/Codes/github/evjs/node_modules/@evjs/server/esm/functions/register.js doesn't exist
204
- <e> .tsx
205
- <e> Field 'browser' doesn't contain a valid alias configuration
206
- <e> /Users/xusd320/Codes/github/evjs/node_modules/@evjs/server/esm/functions/register.js.tsx doesn't exist
207
- <e> .ts
208
- <e> Field 'browser' doesn't contain a valid alias configuration
209
- <e> /Users/xusd320/Codes/github/evjs/node_modules/@evjs/server/esm/functions/register.js.ts doesn't exist
210
- <e> .js
211
- <e> Field 'browser' doesn't contain a valid alias configuration
212
- <e> /Users/xusd320/Codes/github/evjs/node_modules/@evjs/server/esm/functions/register.js.js doesn't exist
213
- <e> as directory
214
- <e> /Users/xusd320/Codes/github/evjs/node_modules/@evjs/server/esm/functions/register.js doesn't exist
215
- <e> /Users/xusd320/Codes/github/node_modules doesn't exist or is not a directory
216
- <e> /Users/xusd320/Codes/node_modules doesn't exist or is not a directory
217
- <e> /Users/xusd320/node_modules doesn't exist or is not a directory
218
- <e> /Users/node_modules doesn't exist or is not a directory
219
- <e> /node_modules doesn't exist or is not a directory
220
- Restarting '/Users/xusd320/Codes/github/evjs/examples/basic-server-fns/dist/server/_dev_start.cjs'
221
- node:events:486
222
- throw er; // Unhandled 'error' event
223
- ^
224
-
225
- Error: listen EADDRINUSE: address already in use :::3001
226
- at Server.setupListenHandle [as _listen2] (node:net:1940:16)
227
- at listenInCluster (node:net:1997:12)
228
- at Server.listen (node:net:2102:7)
229
- at serve (file:///Users/xusd320/Codes/github/evjs/node_modules/@hono/node-server/dist/index.mjs:581:10)
230
- at serve (file:///Users/xusd320/Codes/github/evjs/packages/server/esm/environments/node.js:13:20)
231
- at Object.<anonymous> (/Users/xusd320/Codes/github/evjs/examples/basic-server-fns/dist/server/_dev_start.cjs:4:1)
232
- at Module._compile (node:internal/modules/cjs/loader:1761:14)
233
- at Object..js (node:internal/modules/cjs/loader:1893:10)
234
- at Module.load (node:internal/modules/cjs/loader:1481:32)
235
- at Module._load (node:internal/modules/cjs/loader:1300:12)
236
- Emitted 'error' event on Server instance at:
237
- at emitErrorNT (node:net:1976:8)
238
- at process.processTicksAndRejections (node:internal/process/task_queues:89:21) {
239
- code: 'EADDRINUSE',
240
- errno: -48,
241
- syscall: 'listen',
242
- address: '::',
243
- port: 3001
244
- }
245
-
246
- Node.js v24.12.0
247
- Failed running '/Users/xusd320/Codes/github/evjs/examples/basic-server-fns/dist/server/_dev_start.cjs'. Waiting for file changes before restarting...
248
- Restarting '/Users/xusd320/Codes/github/evjs/examples/basic-server-fns/dist/server/_dev_start.cjs'