sdk-sapi-promarketing 0.0.7 → 0.0.8

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.
Files changed (2) hide show
  1. package/README.md +46 -0
  2. package/package.json +3 -2
package/README.md CHANGED
@@ -93,6 +93,52 @@ import type { QueryType, PlayerType } from "sdk-sapi-promarketing";
93
93
 
94
94
  Ajusta valores según el entorno (desarrollo / producción).
95
95
 
96
+ ## Error `Cannot find module 'sdk-sapi-promarketing'` (TS2307)
97
+
98
+ 1. **Instala el paquete** en el proyecto de la app (no solo en el monorepo raíz si usas workspaces):
99
+
100
+ ```bash
101
+ pnpm add sdk-sapi-promarketing
102
+ ```
103
+
104
+ 2. **Comprueba** que aparece en `package.json` de la app:
105
+
106
+ ```json
107
+ "dependencies": {
108
+ "sdk-sapi-promarketing": "^0.0.7"
109
+ }
110
+ ```
111
+
112
+ 3. **Reinstala** dependencias y reinicia el servidor de TypeScript del IDE:
113
+
114
+ ```bash
115
+ pnpm install
116
+ ```
117
+
118
+ En VS Code/Cursor: `Ctrl+Shift+P` → **TypeScript: Restart TS Server**.
119
+
120
+ 4. **Import correcto** (nombre exacto, sin `sdk-sapi2`):
121
+
122
+ ```typescript
123
+ import { SdkSAPI, type SdkSapiContext } from "sdk-sapi-promarketing";
124
+ ```
125
+
126
+ 5. **Monorepo (pnpm):** declara la dependencia en el `package.json` del paquete/app que importa el SDK, no solo en la raíz, salvo que uses `dependencies` con protocolo de workspace.
127
+
128
+ 6. **`tsconfig.json` de la app** — usa al menos:
129
+
130
+ ```json
131
+ {
132
+ "compilerOptions": {
133
+ "moduleResolution": "bundler",
134
+ "module": "ESNext",
135
+ "skipLibCheck": true
136
+ }
137
+ }
138
+ ```
139
+
140
+ (o `"moduleResolution": "node16"` / `"nodenext"`).
141
+
96
142
  ## Desarrollo del paquete (mantenedores)
97
143
 
98
144
  **Publicar en npm:** ver [docs/PUBLISHING.md](./docs/PUBLISHING.md).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdk-sapi-promarketing",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "TypeScript SDK client for SAPI",
5
5
  "private": false,
6
6
  "keywords": [
@@ -23,7 +23,8 @@
23
23
  ".": {
24
24
  "types": "./dist/index.d.ts",
25
25
  "import": "./dist/index.mjs",
26
- "require": "./dist/index.js"
26
+ "require": "./dist/index.js",
27
+ "default": "./dist/index.js"
27
28
  }
28
29
  },
29
30
  "main": "./dist/index.js",