Bower is not updating in Visual Studio 2015 CTP 6 - bower

I have just installed React using Bower inside Visual Studio 2015 CTP6.
In Dependencies -> Bower -> React (0.13.0)
I do have React package.(js files are also in bower_components/react folder on disk)
When I try to add script <script src="~/lib/ I do not have React in my list of scripts.
Intelligence not working and JavaScript is not loaded.

in this sample I added a simple rule to copy all the .js files:
{
"name": "WebApplication",
"private": true,
"dependencies": {
"bootstrap": "3.0.0",
"jquery": "1.10.2",
"jquery-validation": "1.11.1",
"jquery-validation-unobtrusive": "3.2.2",
"hammer.js": "2.0.4",
"bootstrap-touch-carousel": "0.8.0",
"react": "~0.13.1"
},
"exportsOverride": {
"bootstrap": {
"js": "dist/js/*.*",
"css": "dist/css/*.*",
"fonts": "dist/fonts/*.*"
},
"bootstrap-touch-carousel": {
"js": "dist/js/*.*",
"css": "dist/css/*.*"
},
"hammer": {
"": "hammer.{js,min.js}"
},
"react": {
"": "*.js"
}
}
}
the result is that when you run install bower task you'll find inside the wwwroot/lib a directory named react with just the ,js files.

I think you have configure the exportsOverride section in the bower.json

Related

Can not find module 'debug

I've been having this issue for a while and I've even opened an issue on electron-builder github page but haven't received any response.
I'm running electron builder version 20.38.4 and trying to package the app for Win 64 environment. Everything works fine when I do "yarn dev" and "yarn compile". Even "yarn dist" works without any issue.
However, when I click on the generated .exe file, I get this error message.
Any ideas?
Here's the link to the issue I've opened with some detailed screenshots and log outputs
https://github.com/electron-userland/electron-builder/issues/3561
Here's the package.json as requested
{
"name": "myproj",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"dev": "electron-webpack dev",
"compile": "electron-webpack",
"dist": "yarn compile && electron-builder",
"dist:dir": "yarn dist --dir -c.compression=store -c.mac.identity=null"
},
"dependencies": {
"#rodrigogs/mysql-events": "^0.5.2",
"electron-online": "^1.0.0",
"mysql": "^2.16.0",
"source-map-support": "^0.5.9"
},
"devDependencies": {
"electron": "3.0.10",
"electron-builder": "^20.38.4",
"electron-webpack": "^2.6.1",
"webpack": "^4.26.0"
},
"build": {
"appId": "com.teamio.app",
"productName": "Teamio",
"buildVersion": "1.0",
"copyright": "Copyright © 2018 Teamio.app",
"nsis": {
"oneClick": false,
"perMachine": true,
"allowElevation": true,
"allowToChangeInstallationDirectory": true,
"deleteAppDataOnUninstall": true,
"createDesktopShortcut": true,
"installerIcon": "build/icon.ico",
"uninstallerIcon": "build/icon.ico",
"uninstallDisplayName": "Uninstall Teamio"
},
"win": {
"target": "nsis",
"icon": "build/icon.ico"
}
}
}
Sorry to revive an old question, but what is happening is the electron-online package does not properly define its dependencies in its own package.json. So it is missing the debug package, which you have "solved" by placing another package that requires debug in your project dependencies. In reality though, the (long abandoned) package electron-online should update its dependencies and add debug, among others.
As a slightly cleaner workaround, you could add debug to your project dependencies instead of electron-webpack or webpack.
I had the same problem a few hours ago, resolved by not excluding (ignoring) the src folder from package config. Could you paste you package.json file here ?
Ok. Looks like I've solved my own problem. Not sure why exactly but it worked. What I had to do was move 2 dependencies listed below from devDependencies to dependencies section in my package.json
"electron-webpack": "^2.6.1",
"webpack": "^4.26.0"
If someone can shed some light on that, it'd be helpful. I figured I'd post it here in case someone else runs into this issue.

RNAppAuth, iOS build failed, Unknown type name 'namespace', react-native-app-auth

I am trying to add react-native-app-auth to existing, but quite fresh project with Expo.
I'm following your setup guide, so doing following steps:
yarn add react-native-app-auth#2.2.0 --dev
Add pod 'AppAuth', '>= 0.91'
cd iso && pod install
react-native link (EDIT: from root path of the project)
And I get:
rnpm-install info Linking react-native-app-auth ios dependency
rnpm-install WARN ERRGROUP Group 'Libraries' does not exist in your Xcode project. We have created it automatically for you.
rnpm-install info Platform 'ios' module react-native-app-auth has been successfully linked
which looks fine.
Then when I build in XCode i get the following error:
After searching the web I found it may be connected with compilator I changed it use Objective-C++:
and now I get more errors:
I also tried:
Changing Target version to 9.0
Doing it again
Praying 🙏
Nothing helps :( Xcode Version 9.3 (9E145)
app.js
{
"expo": {
"sdkVersion": "26.0.0",
"ios": {
"bundleIdentifier": "com.xxx.xxx",
"publishBundlePath": "ios/mobile-xxx/Supporting/shell-app.bundle",
"publishManifestPath": "ios/mobile-xxx/Supporting/shell-app-manifest.json"
},
"android": {
"package": "com.xxx.xxx"
},
"name": "mobile-xxx",
"slug": "mobile-xxx",
"version": "0.1.0",
"isDetached": true,
"entryPoint": "./index.js",
"detach": {
"scheme": "exp997ce9c6b4fd43cfa14f4eede063ecf5",
"iosExpoViewUrl": "https://s3.amazonaws.com/exp-exponent-view-code/ios-v2.4.4-sdk26.0.0-3bd935c7-cdd3-4002-8e44-4df857a675f2.tar.gz",
"androidExpoViewUrl": "https://s3.amazonaws.com/exp-exponent-view-code/android-v2.4.0-sdk26.0.0-e63d9209-070c-4118-b06b-c60e82da0b66.tar.gz"
}
}
}
package.js
{
"name": "mobile-xxx",
"version": "0.1.0",
"private": true,
"devDependencies": {
"jest-expo": "26.0.0",
"react-native-app-auth": "2.2.0",
"react-test-renderer": "16.3.0-alpha.1"
},
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"test": "jest"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"expo": "^26.0.0",
"prop-types": "^15.6.1",
"react": "16.3.0-alpha.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-26.0.0.tar.gz",
"react-native-app-auth": "^2.2.0",
"react-native-router-flux": "^4.0.0-beta.28",
"react-redux": "^5.0.7",
"redux": "^3.7.2"
}
}
UPDATE: I have just setup a fresh Expo app following this guide and have exactly the same error. 😞
The problem is that there is an import in header search paths, which searches in the whole /ios folder:
$(SRCROOT)/../../../ios/**
If you happen to use Expo and CocoaPods, there will be boost-for-react-native as a dependency inside your Pods folder. In fact, any package depending on boost will cause this problem. XCode tries to build boost as well, but it has some non-ObjC files, so it will fail.
In order to fix the issue:
Open RNAppAuth.xcodeproj, switch to Build Settings tab and search for header search paths. Replace line $(SRCROOT)/../../../ios/** with
"$(SRCROOT)/../../../ios/YOUR_PROJECT_NAME",
"$(SRCROOT)/../../../ios/Pods/AppAuth/**",
Please note that these changes will disappear after using npm install (or yarn). To make these changes permanent, you can use patch-package.
Edit: this issue has been fixed, using the latest version of the package should work now.

Aurelia Dependency Injection Testing

I've been working in aurelia app and I'm getting an error while testing.
I'm trying to use aurelia-dependency-injection which is already a dependency of other packages which I'm including via jspm like aurelia-framework, aurelia-router, aurelia-templating-resources, aurelia-templating-router and when I try to inject it just works fine on my browser. However, when I try to test using Karma, it says
27 05 2016 09:45:18.202:WARN [web-server]: 404: /base/aurelia-dependency-injection.js
Chrome 50.0.2661 (Linux 0.0.0) ERROR
Error: XHR error (404 Not Found) loading /home/cyberkiller/test_project/aurelia-dependency-injection.js
Error loading /home/cyberkiller/test_project/aurelia-dependency-injection.js as "aurelia-dependency-injection" from /home/cyberkiller/test_project/src/users/list.ts
My package.json has the following jspm dependencies:
"jspm": {
"dependencies": {
"aurelia-animator-css": "npm:aurelia-animator-css#^1.0.0-beta.1.1.2",
"aurelia-bootstrapper": "npm:aurelia-bootstrapper#^1.0.0-beta.1.1.4",
"aurelia-fetch-client": "npm:aurelia-fetch-client#^1.0.0-beta.1.1.1",
"aurelia-framework": "npm:aurelia-framework#^1.0.0-beta.1.1.4",
"aurelia-history-browser": "npm:aurelia-history-browser#^1.0.0-beta.1.1.4",
"aurelia-loader-default": "npm:aurelia-loader-default#^1.0.0-beta.1.1.3",
"aurelia-logging-console": "npm:aurelia-logging-console#^1.0.0-beta.1.1.4",
"aurelia-pal-browser": "npm:aurelia-pal-browser#^1.0.0-beta.1.1.4",
"aurelia-polyfills": "npm:aurelia-polyfills#^1.0.0-beta.1.0.3",
"aurelia-router": "npm:aurelia-router#^1.0.0-beta.1.1.3",
"aurelia-templating-binding": "npm:aurelia-templating-binding#^1.0.0-beta.1.1.2",
"aurelia-templating-resources": "npm:aurelia-templating-resources#^1.0.0-beta.1.1.3",
"aurelia-templating-router": "npm:aurelia-templating-router#^1.0.0-beta.1.1.2",
"bootstrap": "github:twbs/bootstrap#^3.3.5",
"fetch": "github:github/fetch#^0.11.0",
"font-awesome": "npm:font-awesome#^4.6.1",
"simple-line-icons": "npm:simple-line-icons#^2.2.4",
"text": "github:systemjs/plugin-text#^0.0.3"
},
"devDependencies": {
"babel": "npm:babel-core#^5.8.24",
"babel-runtime": "npm:babel-runtime#^5.8.24",
"core-js": "npm:core-js#^1.1.4"
}
}
I did find a workaround, which is to add aurelia-dependency-injection explicitly as a dependency in my package.json like
"aurelia-dependency-injection": "npm:aurelia-dependency-injection#1.0.0-beta.1.2.3"
Which makes my package.json look like:
"jspm": {
"dependencies": {
"aurelia-animator-css": "npm:aurelia-animator-css#^1.0.0-beta.1.1.2",
"aurelia-bootstrapper": "npm:aurelia-bootstrapper#^1.0.0-beta.1.1.4",
"aurelia-dependency-injection": "npm:aurelia-dependency-injection#1.0.0-beta.1.2.3",
"aurelia-fetch-client": "npm:aurelia-fetch-client#^1.0.0-beta.1.1.1",
"aurelia-framework": "npm:aurelia-framework#^1.0.0-beta.1.1.4",
"aurelia-history-browser": "npm:aurelia-history-browser#^1.0.0-beta.1.1.4",
"aurelia-loader-default": "npm:aurelia-loader-default#^1.0.0-beta.1.1.3",
"aurelia-logging-console": "npm:aurelia-logging-console#^1.0.0-beta.1.1.4",
"aurelia-pal-browser": "npm:aurelia-pal-browser#^1.0.0-beta.1.1.4",
"aurelia-polyfills": "npm:aurelia-polyfills#^1.0.0-beta.1.0.3",
"aurelia-router": "npm:aurelia-router#^1.0.0-beta.1.1.3",
"aurelia-templating-binding": "npm:aurelia-templating-binding#^1.0.0-beta.1.1.2",
"aurelia-templating-resources": "npm:aurelia-templating-resources#^1.0.0-beta.1.1.3",
"aurelia-templating-router": "npm:aurelia-templating-router#^1.0.0-beta.1.1.2",
"bootstrap": "github:twbs/bootstrap#^3.3.5",
"fetch": "github:github/fetch#^0.11.0",
"font-awesome": "npm:font-awesome#^4.6.1",
"simple-line-icons": "npm:simple-line-icons#^2.2.4",
"text": "github:systemjs/plugin-text#^0.0.3"
},
"devDependencies": {
"babel": "npm:babel-core#^5.8.24",
"babel-runtime": "npm:babel-runtime#^5.8.24",
"core-js": "npm:core-js#^1.1.4"
}
}
When I update everything and build and run test, it no longer complains and it executes successfully. However I'm not sure if this is just a workaround, or the way to do it. Is there any better way to handle this?
Thanks in advanced!

Why bower installs latest versions of packages and not the exact ones that I want?

Having this in bower.json
{
"name": "test",
"dependencies": {
"jquery": "2.2.4",
"html5shiv": "3.6.2"
}
}
and running
bower install
bower installing not this versions but the latest ones (jquery 3.0.0-rc1 & html5shiv 3.7.3 as for now). Why so? I don't have any other dependencies which can require the newest versions.
This is bower install log
bower cached https://github.com/jquery/jquery-dist.git#2.2.4
bower validate 2.2.4 against https://github.com/jquery/jquery-dist.git#2.2.4
bower cached https://github.com/aFarkas/html5shiv.git#3.6.2
bower validate 3.6.2 against https://github.com/aFarkas/html5shiv.git#3.6.2
bower install jquery#2.2.4
bower install html5shiv#3.6.2
jquery#2.2.4 bower_components\jquery
html5shiv#3.6.2 bower_components\html5shiv
And it's strange for me that .bower.json for html5shiv looks like this
{
"name": "html5shiv",
"version": "3.6.2",
"main": [
"dist/html5shiv.js"
],
"ignore": [
"**/.*",
"composer.json",
"test",
"build",
"src",
"build.xml"
],
"homepage": "https://github.com/aFarkas/html5shiv",
"_release": "3.6.2",
"_resolution": {
"type": "version",
"tag": "3.6.2",
"commit": "f65f9b0d776ae3b88d4c7f0b27c64e384aee47aa"
},
"_source": "https://github.com/aFarkas/html5shiv.git",
"_target": "3.6.2",
"_originalSource": "html5shiv"
}
but bower.json looks like this
{
"name": "html5shiv",
"version": "3.7.3",
"main": [
"dist/html5shiv.js"
],
"ignore": [
"**/.*",
"composer.json",
"test",
"build",
"src",
"build.xml"
]
}
The same is for jQuery. .bower.json referencing the version that I want, but bower.json referencing the latest version. And like I said, source and dist files are from the latest version.
you should use the # before the version
for example
{
"name": "test",
"dependencies": {
"jquery": "#2.2.4"
}
}
You can find more about bower here

Yeoman Angular generator - bower_components missing in app folder

Im on windows and when I use Angular generator to scaffold my application bower_components is missing in app directory - instead its in the root directory
This is my app directory after fresh scaffolding:
So I have to manually put bower components in the app directory...
Any ideas why is this happening?
P.S in bower.json I have:
"appPath": "app"
But that option is not respected, when I run bower install it doesnt add bower_components into the app directory.
Made it work - edited .bowerrc
{
"directory": "app/bower_components"
}
and then bower install.
Now all dependencies are in app directory.
try edit your bower.json file, then run bower install
{
"name": "mi-portfolio",
"version": "0.0.0",
"directory": "bower_components/"
"dependencies":
{
"angular": "1.2.6",
"json3": "~3.2.6",
"es5-shim": "~2.1.0",
"jquery": "~1.10.2",
"bootstrap": "~3.0.3",
"angular-cookies": "1.2.6",
"angular-sanitize": "1.2.6"
},
"devDependencies":
{
"angular-mocks": "1.2.6",
"angular-scenario": "1.2.6"
}
}
look here bower code

Resources