SergeyMell / nativescript-plugins

Apache License 2.0
14 stars 4 forks source link

Errors shown during build with NativeScript 8 #9

Closed sebj54 closed 3 years ago

sebj54 commented 3 years ago

Hi there!

I just updated a project to NativeScript 8 and your plugin is still working like a charm but I have 3 errors displayed during build (ns debug android):

ERROR in ./node_modules/@sergeymell/nativescript-svg/index.android.js 8:15-30
Module not found: Error: Can't resolve 'http' in '/Users/sebjean/sites/payzily-v2/node_modules/@sergeymell/nativescript-svg'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "http": require.resolve("stream-http") }'
    - install 'stream-http'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "http": false }
 @ ./app/main.js 52:38-86

ERROR in ./node_modules/@sergeymell/nativescript-svg/index.android.js 14:16-38
Module not found: Error: Can't resolve 'utils/utils' in '/Users/sebjean/sites/payzily-v2/node_modules/@sergeymell/nativescript-svg'
 @ ./app/main.js 52:38-86

ERROR in ./node_modules/@sergeymell/nativescript-svg/index.android.js 20:13-35
Module not found: Error: Can't resolve 'file-system' in '/Users/sebjean/sites/payzily-v2/node_modules/@sergeymell/nativescript-svg'
 @ ./app/main.js 52:38-86

3 errors have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.31.2 compiled with 3 errors in 21078 ms

Since it's working, I don't know where to look or what to change but I'd be really glad to help and maybe find a solution. Feel free to ask!

SergeyMell commented 3 years ago

Thank you for the issue. I didn't have a chance to check the plugin for NS8 yet. So it seems that the time has come. I will try to take a look on Sunday

SergeyMell commented 3 years ago

Well, I've started migration on Sunday. However, it appeared to be a bit more tricky and I have to spend some more time. I will notify you in a while

ShyshkovOleg commented 3 years ago

Hi, have similar issue with NS8 with angular IOS error: ERROR in ./node_modules/@sergeymell/nativescript-svg/index.js 168:22-44 Module not found: Error: Can't resolve 'utils/utils' in '/Users/oshyshkov/Documents/IDR/juryimpact_mobile/node_modules/@sergeymell/nativescript-svg'

ERROR in ./node_modules/@sergeymell/nativescript-svg/index.js 186:26-42 Module not found: Error: Can't resolve 'trace' in '/Users/oshyshkov/Documents/IDR/juryimpact_mobile/node_modules/@sergeymell/nativescript-svg'

ERROR in ./node_modules/@sergeymell/nativescript-svg/index.js 191:21-44 Module not found: Error: Can't resolve 'ui/core/view' in '/Users/oshyshkov/Documents/IDR/juryimpact_mobile/node_modules/@sergeymell/nativescript-svg'

ANDROID ERROR: ERROR Error: Cannot find module 'file-system'

Is this enough to configure copy at webpack: webpack.Utils.addCopyRule('*/.svg');

@SergeyMell , could you please take a took, because there is no alternatives to your plugin.

SergeyMell commented 3 years ago

Published new version - 1.1.0 with fixed deprecated imports. I've checked on my application and it worked correctly, but feel free to reopen the issue or ping me if something doesn't work as you expected

sebj54 commented 3 years ago

It works great, thanks!