This question already has answers here:
Specifying latest revision of a particular branch with bower
(3 answers)
Closed 9 years ago.
I'm trying to figure out some things in bower but am having some issues. Mainly, when I try and install a locally hosted repo's specific branch.
For instance, I run this command:
bower install appName=/path/to/file
However, when I do that, I get:
ENORESTARGET Tag/branch master does not exist
Additional error details:
Available tags: some-tag-1,
Available branches: integration, origin/bower
I'm specifically trying to get to the 'orgin/bower' branch. Can anyone help?
The correct syntax would be:
bower install appname=/path/to/file#bower
Make sure the path is valid and that it points to a git repo which contains a bower branch.
Also note that appname should be lowercase.
Related
This question already has answers here:
Override registry for installed packages in package-lock.json
(4 answers)
Closed 4 months ago.
I have a Vue 2.7 project with vuetify installed. First, I install dependencies using a custom local npm registry, which is a proxy to npm default, now the project is growing and I'm using git actions to deploy for a development server, or at least I'm trying to.
When GitHub actions try to npm install it uses package-lock.json with my registry configured, and of course can't find it, if I delete my package-lock.json or set package-lock to false before install, it returns a lot of warns and error since packages dependencies are outdated.(this happens even when I use specific versions on package.json)
My questions are.
How can I update the npm registry for all my package-lock.json tree of dependencies in order to maintain the right version for every one of them?
Is there any other solution?
See my answer on a related question:
Find/replace registry in package-lock
Delete node_modules
Verify npm install works
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
I'm trying to run two scripts concurrently, and I found this package concurrently that supposedly would help me. I did npm install concurrently --save and it's listed in my package.json. When I go to run it, however, it throws:
concurrently: command not found
I don't understand why it can't find it despite being installed. I've set up the commands as shown here, so I know it can't be that. I've checked earlier instances of this issue, but it appears to be outdated. Is there another way I can check if this works, or should I try something else?
Screenshot:
When you install using npm install without specifying the global flag -g, you are installing the module to your projects node_modules folder. If that module has any runnable binaries, they will be added to node_modules/.bin - so you should be able to run your local version of concurrently by running node_modules/.bin/concurrently (or from any folder in your project $(npm bin)/concurrently). I personally prefer using the project's local dependencies over installing global ones so I have the option to use a different version in another project.
If you put a script into the package.json "scripts" field it will reference these locally installed without having to specify the full path because npm run adds your projects node_modules/.bin to your path.
If you're having issues, I would start by checking the node_modules/.bin folder and verifying that the binary for your script actually exists.
This issue also comes up when there is a dash "-" in your folder name. i.e. (/developer/api-movies) or even (/developer-apps/apiMovies. Use camelCase throughOut rather than dashes.
This question already has answers here:
webpack is not recognized as a internal or external command,operable program or batch file
(25 answers)
Closed 5 years ago.
I have been playing around with node.js and learning by playing with the Spotify API.
Spotify provided example source code which I have been building off but now I want to make my own thing.
There are many modules in node_module for use for their different examples and I obviously don't want any packages I am not using being hosted on my Git so I looking into my options and came across npm-check (https://www.npmjs.com/package/npm-check)
I did
npm install npm-check
and it was successful
I then try to run the npm-check command in the folder my app.js is contained in like so
npm-check
I then get an error saying it is not a recognized command.
what am I missing?
npm install only installs the npm module into the directory you are currently in., After running that command, you should see a node_modules directory with the npm-check module and all of it's dependencies.
To run npm check here, you would need to run /path/to/.bin/npm-check
If you would like to be able to run npm-check from any directory by simply running npm-check, you must first install it globally:
npm install -g npm-check
This question already has answers here:
NPM installs dependencies in a wrong place
(2 answers)
Closed 7 years ago.
I am trying to spin up a node service on my mac. When I run npm install in the folder where my node service is, it is installing modules which are not mentioned in my package.json. There are extra modules which I am not expecting and some modules that I expect are missing. What could be the reason? How does the node modules folder get created. Does it use any global set up? I am a newbie to nodejs and any help will be appreciated.
Well, it has been introduced with npm3 (https://github.com/npm/npm/blob/master/CHANGELOG.md#v300-2015-06-25):
Flat, flat, flat!
Your dependencies will now be installed maximally flat. Insofar as is
possible, all of your dependencies, and their dependencies, and THEIR
dependencies will be installed in your project's node_modules folder
with no nesting. You'll only see modules nested underneath one another
when two (or more) modules have conflicting dependencies.
I believe this is something new that happened in the newest version of npm.
If I'm not mistaken, it's installing all the dependencies flat instead of nested inside of whichever module that needs it.
This question already has answers here:
nodejs vs node on ubuntu 12.04
(21 answers)
Closed 8 years ago.
I am using ubuntu 14.04 and when i use node hello.js command on terminal nothing happens. I installed the packages using sudo apt-get command. I don't know what is wrong. No error message or anything. I searched for my problem but couldnt find anything.
The problem has to do with package naming. The node package in Debian/Ubuntu is not node.js, it's amateur packet radio software.
My suggestion is that if you want node.js, remove the existing node program (sudo apt-get purge node for Debian/Ubuntu) and follow the instructions here for your particular distro/platform. That should get you the latest stable version, which you should be able to verify with node -v.