Related
I am trying to set up an existing UI project on my mac machine using npm & bower. The project has proper bower.json and .bowerrc files. I run npm install followed by bower install. The expectation is that all the necessary bower packages will end up being created in the specified by .bowerrc directory. The bower install command seems to be executed with no errors, but the packages' folder is NOT created.
The contents of .bowerrc file:
{
"directory": "libraries",
"resolvers": [ "bower-npm-resolver" ]
}
The contents of bower.json file:
{
"name": "ui-project",
"version": "0.1.0",
"license": "All rights reserved.",
"dependencies": {
"angular": "~1.7.x",
"angular-mocks": "~1.7.x",
"angular-translate": "~2.17.x",
"angular-translate-loader-static-files": "~2.17.x",
"angular-animate": "~1.7.x",
"angular-dynamic-locale": "~0.1.x",
"angular-ui-router": "0.4.2",
"angular-moment": "~1.1.0",
"angular-i18n": "~1.7.x",
"angular-ui-utils": "~0.1.1",
"angular-messages": "~1.7.x",
"angular-sanitize": "~1.7.x",
"angular-uuids": "~0.0.4",
"angular-cookies": "1.7.x",
"animate.css": "~3.2.x",
"restangular": "~1.5.0",
"ngstorage": "~0.3.x",
"moment": "~2.10.x",
"ng-file-upload": "~2.2.x",
"lodash": "~4.13.1",
"file-saver": "1.3.3",
"highcharts-release": "~4.1.x",
"highcharts-pattern-fill": "https://github.com/highcharts/pattern-fill.git#3.0.2",
"ng-focus-on": "~0.2.x",
"ngSmoothScroll": "~2.0.0",
"Sortable": "https://github.com/RubaXa/Sortable.git#6952f3b525702e0daa9033b06e7e43e3a5c24692",
"angulartics": "~1.6.0",
"js-sha256": "~0.3.0",
"angular-datepicker": "~2.0.3",
"validator-js": "~8.2.0",
"ip-address": "~5.8.8",
"papaparse": "~4.3.7",
"angulartics-piwik": "~1.0.6",
"fusion-header": "npm:#muteam/fusion-header#2.1.53-light",
"single-spa": "npm:single-spa#5.5.3",
"single-spa-angularjs": "npm:single-spa-angularjs#3.3.0",
"import-map-overrides": "npm:import-map-overrides#1.15.2",
"zone.js": "npm:zone.js#0.10.3",
"systemjs": "npm:systemjs#6.3.2"
},
"resolutions": {
"angular": "~1.7.x"
}
}
The contents of package.json:
{
"name": "ui-project",
"version": "1.0.2361",
"copyright": "All rights reserved.",
"repository": {
"type": "git",
"url": "git#stash.muteam.com/ui-project.git"
},
"engines": {
"node": ">=4.4.0"
},
"scripts": {
"postinstall": "bower install",
"postversion": "git add ./bower-lock.json && git commit --amend --no-edit",
"test": "grunt test",
"build": "grunt build",
"grunt": "grunt",
"grunt:dev": "grunt dev"
},
"devDependencies": {
"bower": "~1.8.8",
"bower-npm-resolver": "^0.10.0",
"chance": "^1.1.4",
"connect-modrewrite": "^0.10.2",
"my-custom-common-components": "^0.0.47",
"grunt": "~0.4.5",
"grunt-autoprefixer": "~1.0.1",
"grunt-bower-task": "~0.4.0",
"grunt-cli": "~1.2.0",
"grunt-concurrent": "~2.3.0",
"grunt-contrib-clean": "~1.0.0",
"grunt-contrib-concat": "~1.0.1",
"grunt-contrib-connect": "~1.0.2",
"grunt-contrib-copy": "~1.0.0",
"grunt-contrib-jshint": "~2.0.0",
"grunt-contrib-less": "~1.3.0",
"grunt-contrib-uglify": "~2.0.0",
"grunt-contrib-watch": "^1.1.0",
"grunt-exec": "^2.0.0",
"grunt-git-describe": "~2.3.2",
"grunt-html2js": "~0.3.6",
"grunt-jsonlint": "~1.1.0",
"grunt-karma": "~3.0.2",
"grunt-less2js": "~0.1.5",
"grunt-ng-annotate": "^2.0.2",
"grunt-ng-constant": "~2.0.2",
"grunt-ngdocs": "~0.2.11",
"grunt-string-replace": "~1.2.1",
"grunt-webfont": "~1.4.0",
"jasmine-core": "~3.5.0",
"js-beautify": "1.6.14",
"jshint-path-reporter": "~0.1.3",
"karma": "~4.4.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage": "^1.1.2",
"karma-firefox-launcher": "~1.0.0",
"karma-jasmine": "^3.1.1",
"karma-jasmine-diff-reporter": "^0.6.2",
"karma-junit-reporter": "~1.1.0",
"karma-ng-html2js-preprocessor": "~1.0.0",
"less": "~1.7.3",
"load-grunt-tasks": "~3.5.0",
"lodash": "~4.13.1",
"time-grunt": "~1.4.0"
},
"dependencies": {
"my-custom-framework": "^1.0.37"
}
}
What could be wrong? Something with the user privileges?
What is in your package.json and bower.json?
The syntax for directory looks right to me as far as comparing to another project of mine. Are you getting any errors after installation?
You might get more details if you try and bower install --verbose
Finally fixed the issue. In my case, uninstalling brew's latest node 14 and installing node 12 from scratch through the regular installer helped.
My Nativescript-Vue project has stopped working without reason, i don't know why.
The gradle build is crashing with this error :
D8: Program type already present: android.support.v4.app.INotificationSideChannel$Stub$Proxy
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
> com.android.build.api.transform.TransformException: Error while generating the main dex list:
Error while merging dex archives:
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Program type already present: android.support.v4.app.INotificationSideChannel$Stub$Proxy
I don't know anything about native android developpment with java so i'm struggling with this error since many hours ..
Here is my app.graddle
apply plugin: "com.android.application"
apply plugin: "com.google.gms.google-services"
dependencies {
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support' && requested.name != 'multidex' ) {
details.useVersion '27.1.1'
}
}
}
}
dependencies {
implementation 'org.slf4j:slf4j-nop:1.7.25'
}
android {
defaultConfig {
multiDexEnabled true
generatedDensities = []
applicationId = "org.nativescript.application"
project.ext {
googlePlayServicesVersion = "+"
}
}
aaptOptions {
additionalParameters "--no-version-vectors"
}
}
and my package.json in case of this error is caused by one nativescript-plugin, which is what I think :
{
"name": "app",
"version": "1.21",
"license": "MIT",
"nativescript": {
"id": "org.nativescript.application",
"tns-ios": {
"version": "5.3.1"
},
"tns-android": {
"version": "5.3.1"
}
},
"scripts": {
"dev:android": "tns debug android --bundle",
"dev:ios": "tns debug ios --bundle",
"lint": "eslint --ext .js,.vue .",
"run:android": "tns run android --bundle",
"run:ios": "tns run ios --bundle",
"clean": "tns platform clean ios; tns platform clean android"
},
"dependencies": {
"axios": "^0.18.0",
"dotenv-webpack": "^1.7.0",
"nativescript": "^5.2.4",
"nativescript-applozic-chat": "^1.2.4",
"nativescript-appversion": "^1.4.1",
"nativescript-barcodescanner": "^3.0.3",
"nativescript-camera": "^4.2.0",
"nativescript-cardview": "^3.1.1",
"nativescript-checkbox": "^3.0.3",
"nativescript-floatingactionbutton": "^5.0.0",
"nativescript-geolocation": "^4.4.2",
"nativescript-google-maps-sdk": "^2.7.0",
"nativescript-google-places-autocomplete": "^1.0.3",
"nativescript-iqkeyboardmanager": "^1.4.0",
"nativescript-keyboard-toolbar": "^1.0.4",
"nativescript-laravel-echo": "^1.0.1",
"nativescript-lottie": "^3.0.2",
"nativescript-modal-datetimepicker": "^1.1.12",
"nativescript-oauth2": "^1.4.1",
"nativescript-pager": "^9.3.14",
"nativescript-phone": "^1.4.0",
"nativescript-plugin-firebase": "^8.1.1",
"nativescript-plugin-gplaces": "^2.4.6",
"nativescript-vue": "^2.0.0",
"nativescript-websockets": "^1.5.3",
"nativescript-windowed-modal": "^5.0.6",
"promise.prototype.finally": "^3.1.0",
"pusher-nativescript": "^1.0.0",
"tns-android": "^5.2.1",
"tns-core-modules": "^5.2.2",
"tns-ios": "^5.2.0",
"ts-loader": "^5.3.3",
"vue-i18n": "^8.9.0",
"vuelidate": "^0.7.4",
"vuex": "^3.0.1"
},
"devDependencies": {
"#babel/core": "^7.0.0",
"#babel/plugin-proposal-class-properties": "^7.4.4",
"#babel/preset-env": "^7.0.0",
"#vue/eslint-config-prettier": "^4.0.1",
"babel-eslint": "^10.0.1",
"babel-loader": "^8.0.2",
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"base-64": "^0.1.0",
"clean-webpack-plugin": "^1.0.1",
"copy-webpack-plugin": "^4.5.2",
"css-loader": "^1.0.0",
"date-fns": "^1.30.1",
"eslint": "^5.12.1",
"eslint-config-prettier": "^4.1.0",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-vue": "^5.1.0",
"lazy": "1.0.11",
"lodash": "^4.17.11",
"nativescript-dev-typescript": "^0.9.0",
"nativescript-dev-webpack": "^0.21.0-next-2019-02-15-084520-01",
"nativescript-image-cache-it": "^4.1.2",
"nativescript-vue-template-compiler": "^2.0.0",
"node-sass": "^4.9.2",
"prettier": "^1.16.1",
"sass-loader": "^7.1.0",
"terser-webpack-plugin": "^1.1.0",
"tns-platform-declarations": "^5.2.2",
"utf8": "^3.0.0",
"vue-loader": "^15.2.6",
"webpack": "^4.16.4",
"webpack-bundle-analyzer": "~3.0.4",
"webpack-cli": "^3.1.0"
}
}
I tried multiple things :
rm -rf hooks/ platforms/ node_modules/ package-lock.json and recompile the whole project
remove the whole .gradle directory in C:/Users/username/ and recompile
uninstall java, and nativescript cli ( tns ) that is globally install, reinstall and recompile
uninstall android-sdk installed with chocolatey in C:/Android, as asked in the nativescript doc, and recompile
tns platform clean android
reclone my project and try to recompile
I'm so desperate that I also created a docker image for nativescript-vue and android to be sure that the error is not related to my computer configuration/environnement, and the error is still here ...
I tried to compile a blank project created with :
vue init nativescript-vue/vue-cli-template
And it's working.
Also, my coworkers can compile the project so it's incomprehensible. My project is the same as theirs, i recloned the project to be sure and they have no not commited files...
I found that the error was caused by this package : "nativescript-google-maps-sdk". Maybe one of the only that i havn't uninstall to see if it was responsible of this error....
Anyway, you can found how i resolved this issue here :
https://github.com/dapriett/nativescript-google-maps-sdk/issues/345#issuecomment-503321201
I have spent over a day trying to get map view to work and along the way I picked up this error that I can't find anywhere at all on the internet. The error code shows up on iOS simulator with a red screen as is typical for react native.
I tried reinstalling the Dev Tools and that didn't work.
Here is my package.json
{
"name":"P77",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "^16.7.0",
"react-native": "0.57.8",
"react-native-elements": "^0.19.1",
"react-native-maps": "^0.22.1",
"react-native-vector-icons": "^6.1.0",
"react-navigation": "git+https://github.com/react-community/react-navigation.git"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.51.1",
"react-devtools": "^3.4.3",
"react-test-renderer": "16.6.3"
},
"jest": {
"preset": "react-native"
}
}
please help
I found out an answer that works for me, but I'm not sure. Maybe this can help people in the future. I ran:
"yarn add eslint-config-rallycoding --dev"
"npm start"
(in project directory)
I am trying to build a Angular2 application using TypeScript in Visual Studio. I followed the steps shown in "5 min Quickstart" in angular2 site.(https://angular.io/guide/quickstart). But I got the following error as shown in following picture
Can anyone Help me to fix the issue "Cannot find name 'Map'? thanks a advanced
the package.json file definition is as follows
{
"name": "angular2-quickstart",
"version": "1.0.0",
"scripts": {
"start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ",
"lite": "lite-server",
"postinstall": "typings install",
"tsc": "tsc",
"tsc:w": "tsc -w",
"typings": "typings"
},
"license": "ISC",
"dependencies": {
"#angular/common": "2.0.0-rc.2",
"#angular/compiler": "2.0.0-rc.2",
"#angular/core": "2.0.0-rc.2",
"#angular/http": "2.0.0-rc.2",
"#angular/platform-browser": "2.0.0-rc.2",
"#angular/platform-browser-dynamic": "2.0.0-rc.2",
"#angular/router": "2.0.0-rc.2",
"#angular/router-deprecated": "2.0.0-rc.2",
"#angular/upgrade": "2.0.0-rc.2",
"systemjs": "0.19.27",
"core-js": "^2.4.0",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.6",
"zone.js": "^0.6.12",
"angular2-in-memory-web-api": "0.0.12",
"bootstrap": "^3.3.6"
},
"devDependencies": {
"concurrently": "^2.0.0",
"lite-server": "^2.2.0",
"typescript": "^1.8.10",
"typings":"^1.0.4"
}
}
I had to change VS file as documented here typescriptServices.js
Invalid module name in augmentation #8518
I see the issue now. this is a duplicate of #7415, and should be fixed
in the next release (see #7507).
As work arounds for now, you can replace C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TypeScript\typescriptServices.js
with the file in
https://raw.githubusercontent.com/Microsoft/TypeScript/Fix8518/lib/typescriptServices.js.
First take a local backup though.
This is related to VS 2015, but somewhere below should be also some solution for VS 2013
After googling a lot at last i found the solution and i want to share it with all of you
just add the following line at the top of component .ts file
///<reference path="../node_modules/angular2/typings/browser.d.ts"/>
just see the picture below
Update
if you use anguler2 beta(angular2/core) then you should add
///<reference path="../node_modules/angular2/typings/browser.d.ts"/>
but if you use angular2 rc1/rc2/rc3(#angular2/core) the you should add
/// <reference path="../node_modules/typescript/lib/lib.es6.d.ts" />
To fix this issue you open your typings.d.ts and comment the below lines
Comment out the below code, it will fix your problem.
//declare var module: {
// id: string;
//};
This is also currently biting my project, which uses gulp-sass. gulp-sass depends on node-sass#^3.4.1 which just automatically updated to 3.5.3 which is a breaking release.
I have degraded my gulp sass version to the older(2.1.0) by updating the
package.json file but its still breaking.
how to go back to node sass 3.4.2?
Error Message
Error: You may not #extend an outer selector from within #media.
You may only #extend selectors within the same directive.
{
"version": "1.0.0",
"name": "abcd",
"devDependencies": {
"bower": "^1.3.12",
"express": "^4.12.3",
"gulp": "^3.8.10",
"gulp-autoprefixer": "^2.1.0",
"gulp-bower": "^0.0.7",
"gulp-concat": "^2.5.2",
"gulp-install": "^0.4.0",
"gulp-livereload": "^3.8.0",
"gulp-minify-css": "^1.0.0",
"gulp-plumber": "^1.0.0",
"gulp-sass": "2.1.0",
"gulp-sourcemaps": "^1.5.1",
"gulp-uglify": "^1.1.0"
},
"dependencies": {
"jquery": "1.11.1"
}
}
Looks like a new version was just released that allows the "buggy" version of node-sass but you can always npm shrinkwrap specific sub-dependencies to a specific version if you need to - assuming that the primary package is compatible with that dependency version.
This will lock the node-sass version in gulp-sass to 3.4.2:
{
"name": "yourprojectname",
"version": "1.0.0",
"dependencies": {
"gulp-sass": {
"version": "2.3.1",
"from": "gulp-sass#>=2.3.1 <3.0.0",
"resolved": "https://registry.npmjs.org/gulp-sass/-/gulp-sass-2.3.1.tgz",
"dependencies": {
"node-sass": {
"version": "3.4.2"
}
}
}
}
}
Make sure you delete your node_modules npm cache clean to clear your locally cached packages before running npm install again.