JS building Error caused by Shopware Paypal Module - shopware

since I installed the SwagPayPal module via composer I am getting the following error when building the storefront using build-storefront.sh:
ERROR in /var/www/html/content/web/vendor/store.shopware.com/swagpaypal/src/Resources/app/storefront/src/swag-paypal.abstract-buttons.js
Module not found: Error: Can't resolve '#paypal/paypal-js' in '/var/www/html/content/web/vendor/store.shopware.com/swagpaypal/src/Resources/app/storefront/src'
Does anybody know what causes this and how to fix this?

In a shell navigate to /var/www/html/content/web/vendor/store.shopware.com/swagpaypal/src/Resources/app/storefront/src and run
npm install
Then try building the storefront again.

Related

Can't create a react native empty project, app.json not found

I am currently trying to get started with react native.
I set up the development environment referring to the documentation, but can't even pass the first step and create an empty project.
I am on Windows 11, Node 16.15.1, and NPM 8.12.2
I keep getting the following error when trying to init react-ative project with expo init awesomeProject
Error downloading and extracting template package: Error: npm exited with non-zero code: 1
× Something went wrong while downloading and extracting the template.
Can't read JSON file: D:\crna\awesomeProject\app.json
└─ Cause: Error: ENOENT: no such file or directory, open 'D:\crna\awesomeProject\app.json'
Does anyone has a suggestion ?
Don't really know what is the problem but i found a soluion that might help other people in the same situation as me! like said here just run in CMD instead of GitBash
Use sudo if on linux. And maybe Admin on windows.

electron-builder installer: A JavaScript error occurred in the main process, Error: The specified module could not be found

I am using electron 11.1.0 and electron-builder 22.10.5
I created a installer for my electron app which is using native module using electron-builder and its working fine on my laptop but on my friends laptop I am getting error
A JavaScript error occurred in the main process
Uncaught Exception:
Error: The specified module could not be found.
\\?C:\some\path\My-Electron-App\resources\app.asar.unpacked\node_modules\obs-studio-node\obs_studio_client.node
I have checked C:\some\path\My-Electron-App\resources\app.asar.unpacked\node_modules\obs-studio-node\obs_studio_client.node file exists.
I guess its asar related issue with native module. I tried by adding "asarUnpack": ["**/*.node"] in my build config but does not help.
How can I fix this problem?
I could not get this working with asarUnpack. Instead I use
"asar": false
Increases the bundle size, but at least it works.

Not able to use opencv4nodejs in Next.js

The opencv4nodejs module is working fine but when I integrate it with next.js, it is showing the following error --
Error in ./utils
Module not found: Error: Can't resolve 'child_process' in '/Users/yathartharora/Certificate/node_modules/opencv-build/build
When I run my OpenCV part separately it is working fine but as soon as I import it in my index.js it shows an error. Can someone please help me in resolving this

'node-jose' library is using 'zlib' library as a dependency which throws an error. How do I fix it and have you encountered the same problem?

I'm trying to use the node-jose library with angular7 for the use with JWEs. The library uses zlib as a dependency and it throws an error when compiling:
ERROR in ./node_modules/zlib/lib/zlib.js
Module not found: Error: Can't resolve './zlib_bindings' in '~\WebApp\node_modules\zlib\lib'
I opened the 'zlib.js' file and the contents are the following:
module.exports = require('./zlib_bindings');
The problem is that the required file doesn't exist. I inspected the rest of the library and there is no such file in the whole library.
I searched the whole internet and no one has described the same problem as I have. There are some discussions regarding the 'node-jose' library but none of those issues are related to 'zlib'.
I would be extremely thankful if only someone would say they share the same error. Thanks in advance!
I found the answer.
Angular isn't showing an error when compiling but shows an error in the browser. It's because the browser doesn't have 'node' libraries integrated so it can't start the 'zlib' library. Installing the 'zlib' library in 'node_modules' doesn't help since it's deprecated.
Using the 'browserify-zlib' library and changing the ...require('browserify-zlib') in all my dependencies has fixed the issue.
This PR will fix the issue in node-jose
https://github.com/cisco/node-jose/pull/264
This is published to npm as node-jose-browserify, https://www.npmjs.com/package/node-jose-browserify
npm i node-jose-browserify

Message "Failed to instantiate module growlNotifications..." appear on production env

I am current using mean.io as development framework of my application and have been using growlNotifications plug-in for certain time and it works perfect on both server and client side.
while after some coding commit (does not affect the plug-in), the following error appear on the production server:
Uncaught Error: [$injector:modulerr] Failed to instantiate module acleague due to:
Error: [$injector:modulerr] Failed to instantiate module growlNotifications due to:
Error: [$injector:nomod] Module 'growlNotifications' is not available! You either...<omitted>...3)
but it won't have any problem running on local. I ensure that the bower install work perfectly on production server and i did nth in the grunt file.
Could anyone help me or even give me some hints to solve this problem? Thanks a lot!
As I was set the bower component as latest, the production server will run the bower update command to get the latest one while local does not.
So I upgraded the plugin and run it on both sides, it works now.

Resources