Giter Site home page Giter Site logo

Refusing to install package with name "ikea-availability-checker" under a package also called "ikea-availability-checker" about ikea-availability-checker HOT 9 CLOSED

ephigenia avatar ephigenia commented on September 23, 2024
Refusing to install package with name "ikea-availability-checker" under a package also called "ikea-availability-checker"

from ikea-availability-checker.

Comments (9)

Ephigenia avatar Ephigenia commented on September 23, 2024

@ss-marie the error message reads like you’re trying to install the package in a package which is using the same name. Try renaming your package / directory to a different than "ikea-availability-checker".

from ikea-availability-checker.

Ephigenia avatar Ephigenia commented on September 23, 2024

Just to be sure I tried it myself:

➜ npm install ikea-availability-checker
npm ERR! code ENOSELF
npm ERR! Refusing to install package with name "ikea-availability-checker" under a package
npm ERR! also called "ikea-availability-checker". 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!     /Users/ephigenia/.npm/_logs/2020-08-17T15_59_23_445Z-debug.log

See: https://www.google.com/search?q=code+ENOSELF

from ikea-availability-checker.

ss-marie avatar ss-marie commented on September 23, 2024

@Ephigenia The directory name was originally the default after cloning from GitHub, "ikea-availability-checker". I renamed the directory but I am still getting the same error.

I have also tried renaming the package name inside package.json. In that case, the install command succeeds. However then when running the app with npm run start -- stores at I get the following error, so I don't think I can resolve the issue by renaming the app.

[email protected] start C:\Users\ssmarie\Documents\GitHub\ikea-availability-checker-folder
node $npm_package_main "stores" "at"
internal/modules/cjs/loader.js:1083
throw err;
^

Error: Cannot find module 'C:\Users\ssmarie\Documents\GitHub\ikea-availability-checker-folder$npm_package_main'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1080:15)
at Function.Module._load (internal/modules/cjs/loader.js:923:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []

from ikea-availability-checker.

Ephigenia avatar Ephigenia commented on September 23, 2024

@ss-marie if you cloned the repo you won’t need to install it via npm install ikea-availability-checker as the directory already contains the sources of the project.

from ikea-availability-checker.

ss-marie avatar ss-marie commented on September 23, 2024

@Ephigenia Thanks for your response. Unfortunately even if I leave the package and app name the same as the default after cloning the source, I am unable to run the app using npm i and npm run start -- stores at as I get the same error above with code MODULE_NOT_FOUND.

from ikea-availability-checker.

Ephigenia avatar Ephigenia commented on September 23, 2024

I only can make assumptions here as I’m not sure what you're planning to do. The things you wrote either read as if you’re planning to contribute something to the project (by mentioning "clone") - on the other hand it seemed like you’re have a modified package.json in the cloned project which would conflict with your plans.

If you’re trying to contribute, I assume that you’d do the following:

git clone https://github.com/Ephigenia/ikea-availability-checker.git
cd ikea-availability-checker;
npm run start -- --help

if you’re trying to install the tool and run in without installing it globally (npm install -g …), in that case you’d have to call the alias that is created by npm:

mkdir ikea-availability-checker-test;
cd ikea-availability-checker-test;
npm install kea-availability-checker;
node_modules/.bin/ikea-availability;

from ikea-availability-checker.

Ephigenia avatar Ephigenia commented on September 23, 2024

It looks like the README.md is not clear about this. I’ll try to make an update to get this more clear.

from ikea-availability-checker.

Ephigenia avatar Ephigenia commented on September 23, 2024

@ss-marie please check the README on the development branch: https://github.com/Ephigenia/ikea-availability-checker/tree/development

Does it get more clear now?
I’d be happy if you could confirm - also that everything is fine for you now - to be able to close this issue?

from ikea-availability-checker.

Ephigenia avatar Ephigenia commented on September 23, 2024

Closing this now.

from ikea-availability-checker.

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.