I have a package in my bower.json file configured like this:
"package": "git#bitbucket.org:company/project.git#stage",
I own that package and update the stage's branch very often.
To update that bower component in the project which uses that library I have to reinstall the bower component removing the bower_components/package folder and reinstalling with bower install.
Is there any other way for bower to detect modifications in the stage's branch?
Just running the install again (without the --save option) should work.
bower install https://bitbucket.org/company/project.git#stage
If not, first try to uninstall the package with:
bower uninstall https://bitbucket.org/company/project.git#stage
Related
Does Webpack install -g, automatically install to nodeJS's package.json? Or is this only for local installs?
So I'm tired of trying to find workarounds for require() is not defined. Meaning I would need a module loader for my project to include modules client side. Well, I've downloaded the famous 'webpack' module loader, globally
npm install -g webpack
and I noticed it didn't install to "devDependencies" in my package.json file. But I also install webpack-dev-server, but locally,
npm install webpack-dev-server --save-dev
and it was saved into my package.json. Was this saved because I used --save-dev or because I installed locally?
I'm getting an error stating my webpack module I downloaded doesn't have a configuration file, so I'm assuming I install webpack wrong, and maybe it shouldn't have been installed globally. Please help with the understanding of globally and locally, as well as why this -g webpack install didnt get saved to the package.json?
The command npm install --gloabl will install a package in global scope and make it's bin command available to you globally. This has nothing to do with the folder or project your are in right now. That means a global install will not leave anything in any package.json files.
Learn more about npm install: https://docs.npmjs.com/cli/install
npm install -g webpack will save your files in your OS file system.
npm install webpack-dev-server --save-dev will save your package in your project directory inside a folder called node_modules.
The later one will make an entry in package.json file so that next time you can install all dependdencies with just npm install command. This command installs all your packages listed in package.json.
Missing Config file: Its looking for a file called webpack.config.js. More info can be found here: https://webpack.js.org/configuration/
I have multiple node modules developed by myself stored on a private gitlab server. In my Project, i install those modules with bower, so my Project structure Looks like this:
appname
bower_components
module1
...
package.json
module2
...
node_modules
...
package.json
When i call npm install only the dependencies from the package.json file located in the Folder "appname" will be installed. The Problem is, that my modules, which i install with bower, also have dependencies, which are not listed in the package.json in the root Folder. How can i install those dependencies without installing them globally? It should by something like npm install bower_components\module1. I also tried to use the command line Option --prefix but it only copies the Folder inside the node_modules Folder.
Thanks for your help
I have downloaded this example : PolymerElements/app-layout-templates
..and I can't make it work (whereas I was able to access this one : PolymerElements/polymer-starter-kit)
I ran the following lines in the terminal :
bower init
bower -save polymer
bower bower install –save Polymer/polymer-elements Polymer/polymer-ui-elements
bower update
...and then accessed the folder via a python server.
Do you have some tips to make it work ?
If you want to try out PolymerElements/app-layout-templates then that's what you need to install on bower. Bower will download all the required dependencies for app-layout-templates to work.
bower install --save PolymerElements/app-layout-templates
After this you can start python server on folders app-layout-template, app-layout-template/nav-view etc to see how it works.
Also the repositories Polymer/polymer-elements, Polymer/polymer-ui-elements are invalid. The polymer elements are available in github repository https://github.com/PolymerElements. So to download polymer elements try something like below
bower install --save PolymerElements/iron-elements
bower install --save PolymerElements/paper-elements
bower install --save PolymerElements/neon-elements
bower install --save PolymerElements/platinum-elements
I installed Polymer using the following commands:
bower init
bower install --save Polymer/polymer#^1.1.0
bower install --save PolymerElements/paper-elements
It created a subfolder called bower_components. But none of the files were found until I copied them to a different subfolder, and then everything started working.
Why is that?
Perhaps you want to install your bower components in the "different subfolder" by default. This can be done using the following in .bowerrc:
{
"directory": "some/directory"
}
Hope that helps.
bower_components is created when you invoke bower install. All deps in bower.json will be downloaded there.
I am having error at polymer installation by bower.
when I am install polymer using bower I've got below message and I can't move forword. I've installed git in path already.
bower ENOGIT git is not installed or not in the PATH
Please Help me for find out, I am just newbie.
That error means that you don't have GIT installed. Bower needs GIT installed on your system so it can download repositories. If you do have it installed it could be that you don't have it listed on your PATH (System properties, system variables).