I am getting a problem trying to execute a bower install on my project
I am just executing bower install command on my debian OS
but when this is recognizing the dependencies defined on my bower.json.
its got stuck in a part that I dont understand
this is the last part that i see in my command line
"dependencies": {
"angular": {
"endpoint": {
"name": "angular",
"source": "angular",
"target": "^1.0.8"
},
"canonicalDir": "/home/ricco/.cache/bower/packages/060a9fe0e60a0d3d6c9ed350cde03e61/1.5.4",
"pkgMeta": {
"name": "angular",
"version": "1.5.4",
"license": "MIT",
"main": "./angular.js",
"ignore": [],
"dependencies": {},
"homepage": "https://github.com/angular/bower-angular",
"_release": "1.5.4",
"_resolution": {
"type": "version",
"tag": "v1.5.4",
"commit": "b972d5aa130bef5c4d931f22bd11627207ea35ca"
},
"_source": "https://github.com/angular/bower-angular.git",
"_target": ">=1"
},
"dependencies": {},
"nrDependants": 1
}
},
"nrDependants": 1
}
]
}
]
}
}, {
"type": "input",
"message": "Answer",
"name": "prompt",
"level": "prompt"
then there after dislpaying the
{
"type": "input",
"message": "Answer",
"name": "prompt",
"level": "prompt"
it got stuck there for some reason.
This is my bower.json
{
"name": "ng-boilerplate",
"version": "0.3.2",
"devDependencies": {
"angular": "~1.2",
"angular-mocks": "~1.2",
"bootstrap": "~3.1",
"angular-bootstrap": "~0.10.0",
"angular-ui-router": "~0.2",
"angular-route":"1.5.3",
"angular-resource":"1.5.3"
},
"dependencies": {}
}
I experienced the same issue using the Angular boilerplate ngbp.
I solved the issue by removing the following line from my .bowerrc file:
"json": "bower.json"
Alternatively, see the answer below by #NikolaB. which involves adding resolutions to your bower.json instead of removing this line.
When you specify dependencies for your app via Bower, some of the packages might rely on different versions of the same library. You will have to resolve what version of libraries you want in your app.
If you configure you Bower using "json": "bower.json" inside .bowerrc file, Bower will expect those resolutions to be inside bower.json file. This means that you must have "resolutions" property inside bower.json file.
So, you could try adding "resolutions" property into your bower.json:
{
"name": "ng-boilerplate",
"version": "0.3.2",
"devDependencies": {
"angular": "~1.2",
"angular-mocks": "~1.2",
"bootstrap": "~3.1",
"angular-bootstrap": "~0.10.0",
"angular-ui-router": "~0.2",
"angular-route":"1.5.3",
"angular-resource":"1.5.3"
},
"resolutions": {
"angular": "1.2.12"
}
}
Related
I have an electron application with main process as follows:
const {app, BrowserWindow, Menu, dialog} = require('electron');
const path = require('path')
let logConfig = require('./js/loggConfig.js');
....
This executes perfectly when run directly from terminal.
But when I package this project using electron-builder, and install it on another machine (Windows 10), I get the following error while launching the app:
Error: Cannot find module '.js/loggConfig.js'
How do I resolve this?
Here is how my package.json looks like:
{
"name": "ABCD",
"version": "0.0.1",
"description": "...",
"author": "abcd <abcd#gmail.com>",
"homepage": "http://www.abcd.com",
"main": "main_electron.js",
"scripts": {
"postinstall": "install-app-deps",
"start": "electron .",
"dist": "build"
},
"build": {
"appId": "yourappid",
"dmg": {
"contents": [
{
"x": 110,
"y": 150
},
{
"x": 240,
"y": 150,
"type": "link",
"path": "/Applications"
}
]
},
"linux": {
"target": [
"AppImage",
"deb"
],
"category": "Video"
},
"win": {
"target": "NSIS",
"icon": "build/icon.ico",
"extraResources": [
]
}
},
"dependencies": {
"electron-context-menu": "^0.9.1",
"electron-log": "^2.2.13",
"fs": "0.0.1-security",
"mkdirp": "^0.5.1",
"path": "^0.12.7",
"uuid": "^3.1.0",
"xmlbuilder": "^9.0.4",
"zip-folder": "^1.0.0"
},
"devDependencies": {
"electron": "^1.7.9",
"electron-builder": "^19.49.0"
}
}
I solved the issue changing the build configuration.
Setting asar to false.
Setting asarUnpack to export all the asar content with "**/*".
"build": {
"appId": "app.node.electron",
"productName": "app electron",
"asar":false,
"asarUnpack":[
"**/*"
],
"directories": {
"output": "release"
},
"win": {
"publisherName": "app electron",
"icon": "icon.png",
"target": [
"nsis"
]
},
},
I have a dot net core console app that I want to run as a webjob in Azure. When it tries to execute I see in the logs
Error: assembly specified in the dependencies manifest was not found -- package: 'Microsoft.DotNet.InternalAbstractions', version: '1.0.0', path: 'lib/netstandard1.3/Microsoft.DotNet.InternalAbstractions.dll'
My project.json looks like this
{
"buildOptions": {
"emitEntryPoint": true,
"copyToOutput": [ "appsettings.json", "run.cmd" ]
},
"dependencies": {
"Helga.Core": "1.0.0-*",
"Helga.UpdateParkings": "1.0.0-*",
"Microsoft.Extensions.Configuration": "1.0.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.1"
}
},
"frameworks": {
"netcoreapp1.0": {
"imports": "dnxcore50"
}
},
"publishOptions": {
"include": [
"appsettings.json",
"run.cmd"
]
},
"version": "1.0.0-*"
}
but in project.lock.json I see
"Microsoft.DotNet.InternalAbstractions/1.0.0": {
"type": "package",
"dependencies": {
"System.AppContext": "4.1.0",
"System.Collections": "4.0.11",
"System.IO": "4.1.0",
"System.IO.FileSystem": "4.0.1",
"System.Reflection.TypeExtensions": "4.1.0",
"System.Runtime.Extensions": "4.1.0",
"System.Runtime.InteropServices": "4.1.0",
"System.Runtime.InteropServices.RuntimeInformation": "4.0.0"
},
"compile": {
"lib/netstandard1.3/Microsoft.DotNet.InternalAbstractions.dll": {}
},
"runtime": {
"lib/netstandard1.3/Microsoft.DotNet.InternalAbstractions.dll": {}
}
},
Please advice.
I had made the deployment by zipping up the bin/debug folder and apparently the build references assemblies in installed sdk's etc.
When I did a Publish of the project to the filesystem and zipped up the PublishOutput folder instead everything started working because all dependant assemblies were copied to that folder.
I'm having an issue when building my web application using Brunch. My application depends on a module I've created and uploaded to NPM, and whenever I build it, I get:
DEPS_RESOLVE_FAILED of node_modules/rd-vue-bootstrap/dist/rd-vue-bootstrap.js failed.
Could not load module './bs-button-group.vue' from '/Users/rjuliani/dev/production-manager-ui/node_modules/rd-vue-bootstrap/dist'.
Make sure the file actually exists
The module itself builds just fine, however when I use it from my test web application and build it (the web application) it throw me the above error.
The relevant parts of my package.json file for the module are:
"main": "dist/rd-vue-bootstrap.js",
"files": [
"dist/rd-vue-bootstrap.js",
"dist/rd-vue-bootstrap.js.map",
"dist/rd-vue-bootstrap.min.js",
"src"
],
brunch-config.js
module.exports = {
files: {
javascripts: {
joinTo: 'app.js'
},
templates: {
joinTo: 'app.js'
}
},
plugins: {
babel: {
},
assetsmanager: {
copyTo: {
'vendor': ['node_modules/bootstrap', 'node_modules/jquery', 'node_modules/rd-vue-bootstrap']
},
minTimeSpanSeconds: 10 // assets won't be copied more frequent than once per X seconds.npm
}
}
};
initialize.js (main file for my web application)
import Vue from 'vue';
import RdVueBootstrap from 'rd-vue-bootstrap';
Vue.use(RdVueBootstrap);
Finally, package.json for my test web application
{
"name": "production-manager-ui",
"description": "Simple UI for the production-manager API project",
"version": "0.0.1",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/radical-dreamers/production-manager-ui.git"
},
"scripts": {
"watch": "brunch watch --server",
"build": "brunch build --production"
},
"author": {
"url": "http://www.codelightsoftware.com",
"name": "Rodrigo Juliani",
"email": "srodriki#gmail.com"
},
"keywords": [
"vue",
"brunch"
],
"dependencies": {
"bootstrap": "^3.3.7",
"jquery": "^3.1.0",
"rd-vue-bootstrap": "0.0.6",
"vue": "^1.0.26",
"vue-router": "^0.7.13"
},
"devDependencies": {
"assetsmanager-brunch": "^1.8.1",
"auto-reload-brunch": "^2.7.1",
"babel-brunch": "^6.0.6",
"brunch": "^2.8.2",
"css-brunch": "^2.6.1",
"javascript-brunch": "^2.0.0",
"vue-brunch": "^1.1.2",
"vue-devtools": "^2.0.4"
}
}
Any ideas how to fix this? I've tried many things and nothing seems to be working as of right now :(
Thanks!
I have a private yeoman generator on my gitlab.
After using npm install -g [url_to_my_generator], I found that yo can't recognize it.
But when I clone it to local and then use npm install && npm link, it works fine and appears in "Available Generators".
Here is my generator's package.json
{
"name": "generator-my-generator",
"version": "0.0.1",
"description": "xxx",
"keywords": [
"yeoman-generator",
"generator"
],
"author": {
"name": "xxx",
"email": "xxx",
"url": "xxx"
},
"main": "app/index.js",
"repository": {
"type": "git",
"url": "git+ssh://xxx/generator-my-generator.git"
},
"dependencies": {
"yeoman-generator": "^0.19.0",
"chalk": "^1.0.0",
"yosay": "^1.0.2"
},
"devDependencies": {},
"files": [
"app"
]
}
And my environments:
OS: Windows 7
yo: 1.4.7
npm: 2.13.5
Thank you for helping.
Two troubleshooting techniques:
Run yo doctor. That's your best friend for any issue with Yeoman.
Make sure the files property of your package.json includes your generators.
I just published my npm package. But now when I install it using sudo npm install package-name -g, it does download the package but does not download its dependencies. I know this because when I execute this package command packagename path/to/folder then shows an error about it dependencies that is Error: Cannot find module 'hound'. Hound is its dependency. Below is my package.json file
{
"name": "package-name",
"description": "description",
"version": "0.1.1",
"homepage": "url",
"author": {
"name": "Name",
"email": "email#gmail.com"
},
"repository": {
"type": "git",
"url": "url to git"
},
"bugs": {
"url": "url/issues"
},
"licenses": [
{
"type": "MIT",
"url": "url to LICENSE-MIT"
}
],
"main": "lib/package-name",
"engines": {
"node": "0.10.32"
},
"devDependencies": {
"hound": "1.0.4",
"async": "0.9.0",
"replace": "0.3.0",
"grunt": "~0.4.5",
"node-dir": "0.1.6"
},
"keywords": [],
"preferGlobal": "true",
"bin": {
"cssimport" : "lib/package-name.js"
}
}
How can I change this so when user install my package then its dependency automatically downloads and starts working?
Hound is set up as a devDepency, it's not going to be installed in a normal install. If you change that to dependencies it will be. If you need certain things as devDependencies to build your package (like grunt), leave them under that key.