capacitor-community / apple-sign-in

Sign in with Apple Support
MIT License
135 stars 58 forks source link

Cant resolve scriptjs #35

Closed lucasrleandro closed 3 years ago

lucasrleandro commented 3 years ago

Hi,

I installed the package and imported it (just like the docs). But when I get this error in compilation...

ERROR in ./node_modules/@capacitor-community/apple-sign-in/dist/esm/web.js Module not found: Error: Can't resolve 'scriptjs' in '/Users/***/node_modules/@capacitor-community/apple-sign-in/dist/esm' [ERROR] An error occurred while running subprocess ng.

lucasrleandro commented 3 years ago

Removed the registerWebPlugin, since i only use it on iOS. Still get the error when building --prod. Then i commented the following lines on "apple-sign-in/dist/esm/web.js"

const script = require("scriptjs"); script(this.appleScriptUrl, () => resolve(true));

Now it compiles and works in development device.

cyril-colin commented 3 years ago

To make it works, I have added scriptjs to my main project with npm install scriptjs

epicshaggy commented 3 years ago

resolved in #20