polotno-node 0.3.7 → 0.3.10
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/README.md +18 -0
- package/dist/client.2c9a0b39.js +4164 -0
- package/dist/client.html +1 -1
- package/instance.js +1 -0
- package/package.json +5 -5
- package/dist/client.41cd7b05.js +0 -1824
package/README.md
CHANGED
|
@@ -119,3 +119,21 @@ const instance = await createInstance({
|
|
|
119
119
|
}),
|
|
120
120
|
});
|
|
121
121
|
```
|
|
122
|
+
|
|
123
|
+
## Troubleshooting
|
|
124
|
+
|
|
125
|
+
If you have an error like this
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
Unhandled Promise Rejection {"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"Error: Evaluation failed: ReferenceError: store is not defined\n at __puppeteer_evaluation_script__:3:9"
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
It may mean that Polotno Client Editor was not loaded in `puppeteer` instance. It is possible that you are missing required files in `node_modules` folder. I got this error when I was trying to run `polotno-node` on Vercel. To fix the issue you need to add this config into `vercel.json`:
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
"functions": {
|
|
135
|
+
"api/render.js": { // remember to replace this line with your function name
|
|
136
|
+
"includeFiles": "node_modules/polotno-node/**"
|
|
137
|
+
},
|
|
138
|
+
}
|
|
139
|
+
```
|