NPM Package Creates Infinite Loading Loop- Safe Mode Doesn't Even Work

Adding cropperjs v1.6.1 crashes the WeWeb editor and puts it into an infinite reload loop, making the project completely unusable. It’s impossible to remove the plugin or package because not even Safe Mode works to load the editor.

https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.6.1/cropper.min.js

For those that run into this as well, you can uninstall plugins by using WeWeb’s graphql endpoints without being inside the project. You’ll need to get your cookies and such from another working request, and you can find your project’s design id in the URL.

curl --location 'https://apollo.weweb.io/graphql' \
--header 'accept: */*' \
--header 'accept-language: en-US,en;q=0.9' \
--header 'content-type: application/json' \
--header 'dnt: 1' \
--header 'origin: https://editor.weweb.io' \
--header 'priority: u=1, i' \
--header 'referer: https://editor.weweb.io/' \
--header 'sec-ch-ua: "Not)A;Brand";v="8", "Chromium";v="138"' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'sec-ch-ua-platform: "Linux"' \
--header 'sec-fetch-dest: empty' \
--header 'sec-fetch-mode: cors' \
--header 'sec-fetch-site: same-site' \
--header 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36' \
--header 'your-cookie-here' \
--data '{"query":"mutation DeleteDesignPlugin($designId: String!, $pluginId: String!) {\n  deleteDesignPlugin(designId: $designId, pluginId: $pluginId) {\n    success\n    __typename\n  }\n}","variables":{"designId":"1bb54814-your-design-id","pluginId":"69d4a5bb-09a3-4f3d-a94e-667c21c057eb"}}'
3 Likes

Hi Micah :waving_hand:

I’m glad you managed to solve it.

Sometimes it can get tricky working with external NPM packages.

Thank you for sharing your solution. :folded_hands:

1 Like