skhye05 / nativescript-multi-select

Apache License 2.0
11 stars 6 forks source link

Module not found: Error: Can't resolve 'tns-core-modules/color/color' #17

Open phoenix869 opened 3 years ago

phoenix869 commented 3 years ago

I was trying to implement this using all the code on the page(https://www.npmjs.com/package/nativescript-multi-select)... just to test it, understand it and later use it... But I have come across this error.

ERROR in ../node_modules/nativescript-multi-select/multi-select.js Module not found: Error: Can't resolve 'tns-core-modules/color/color' in 'D:..\native\gitPullFreshStart..\node_modules\nativescript-multi-select' @ ../node_modules/nativescript-multi-select/multi-select.js 3:14-53 @ ./app/tstest/tstest.component.ts @ ./app/app.module.tns.ts @ ./main.tns.ts

Even though I have this line [ "tns-core-modules": "@nativescript/core",] in webpack.config.js, it wasn't working.

so to solve this problem I change the code in the node module... multi-select-andjoid.js from this [var color_1 = require("tns-core-modules/color/color"); ] to this [var color_1 = require("@nativescript/core/color");]