Giter VIP home page Giter VIP logo

Comments (5)

ENG1N3X avatar ENG1N3X commented on July 1, 2024 8

@frugan-it

import NiceSelect from "nice-select2/dist/js/nice-select2";
import "nice-select2/dist/css/nice-select2.css";

try this

from nice-select2.

billiewillie avatar billiewillie commented on July 1, 2024 1

@frugan-it

import NiceSelect from "nice-select2/dist/js/nice-select2"; import "nice-select2/dist/css/nice-select2.css";

try this

Thanks! You saved my day

from nice-select2.

Baedda avatar Baedda commented on July 1, 2024 1

I guess this error is, because the main key in package.json is pointing to webpack.config
https://github.com/bluzky/nice-select2/blob/master/package.json#L5

The main field should point to the entry point of the lib. Normally it is an index.js or something like that.
https://docs.npmjs.com/cli/v8/configuring-npm/package-json#main

from nice-select2.

ENG1N3X avatar ENG1N3X commented on July 1, 2024

I guess this error is, because the main key in package.json is pointing to webpack.config https://github.com/bluzky/nice-select2/blob/master/package.json#L5

The main field should point to the entry point of the lib. Normally it is an index.js or something like that. https://docs.npmjs.com/cli/v8/configuring-npm/package-json#main

Yep, you are right

from nice-select2.

krisimmig avatar krisimmig commented on July 1, 2024

I still get the same issue even with the "main" key pointing to the js file. The solution to import from the /src directory directly works though. 🤷

from nice-select2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.