The npm community forum has been discontinued.
To discuss usage of npm, visit the GitHub Support Community.
my package can't install
I create a package named
react-mui-datatables. I can’t install that using
npm install --save react-mui-datatables. this error occurred,
npm ERR! code ENOSELF npm ERR! Refusing to install package with name "react-mui-datatables" under a package npm ERR! also called "react-mui-datatables". Did you name your project the same npm ERR! as the dependency you're installing? npm ERR! npm ERR! For more information, see: npm ERR! <https://docs.npmjs.com/cli/install#limitations-of-npms-install-algorithm> npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Gihan\AppData\Roaming\npm-cache\_logs\2018-08-12T08_17_18_024Z-debug.log
how can I fix that error? please help me
You are running this command inside a folder which has a
package.json. This file has a
name property which is also
react-mui-datatables. You need to change the name. It cannot be the same as the package you are trying to install.
i tried but its not working
Hei, have you tried it with a new project?
mkdir my-project cd my-project npm init -y npm i --save react-mui-datatables
can you import MuiDataTable? i can’t this error occurred. why? i create a new project.now i can install.but can’t import.
i have this in local its working but npm installed version gives this error
./node_modules/react-mui-datatables/lib/index.js Module not found: `D:\My Projects\React\Libraries\Datatable\example-table\node_modules\react-mui-datatables\lib\MUIDataTable.js` does not match the corresponding path on disk `MuiDataTable.js`.
No. The problem is that the
"main" section in the
react-mui-datatables points to
index.js, but in the archive it is located in