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.
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 have installed react-native and built some simple application. I ran it and everything was fine. After a while, I could not run anymore my application, because every time I type "react-native start" in cmd, it gets me something like in the picture below. Does anyone have any idea?
EDIT: package json looks like:
{
"name": "AwesomeProject",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "15.3.2",
"react-native": "0.36.0",
"react-native-checkbox": "^1.0.15",
"react-native-mail": "^2.0.0"
},
"jest": {
"preset": "jest-react-native"
},
"devDependencies": {
"babel-jest": "16.0.0",
"babel-preset-react-native": "1.9.0",
"jest": "16.0.2",
"jest-react-native": "16.0.0",
"react-test-renderer": "15.3.2"
}
}
according to me you need to run npm install from your root project dir because you might have deleted some file from node_module folder which will be recovered after running the above command.
I'm using NS 2.3.0 and when I start tns run android (and iOS too), there is an error that says:
Processing node_modules failed. SyntaxError:/Users/ledinh/Smarp/node_modules/npm/node_modules/read-package-tree/test/fixtures/empty/node_modules/foo/package.json: Unexpected end of input
This was actually happening to me since 2.2, updating to 2.3 does not solve problem. Even the tns doctor said that no issues were detected. Any help would be much appreciated.
EDIT: Here is my package.json
{
"devDependencies": {
"babel-traverse": "6.15.0",
"babel-types": "6.15.0",
"babylon": "6.9.2",
"lazy": "1.0.11",
"nativescript-dev-typescript": "^0.2.3",
"typescript": "^1.7.5"
},
"nativescript": {
"id": "com.smarpsocial.smarpshare",
"tns-ios": {
"version": "2.3.0"
},
"tns-android": {
"version": "2.3.0"
}
},
"scripts": {
"dummy": "echo yay",
"ios": "xcproj --project platforms/ios/SmarpShare.xcodeproj touch; xcproj --project platforms/ios/Pods/Pods.xcodeproj touch; tns livesync ios --emulator --watch",
"test-json-schema": "echo 'Not yet implemented';exit 1;"
},
"dependencies": {
"app-data": "file:setup_assets/plugins/app-data",
"jed": "1.1.0",
"moment": "^2.10.6",
"nativescript-appversion": "^1.1.2",
"nativescript-appwidget": "file:setup_assets/plugins/nativescript-appwidget",
"nativescript-clipboard": "^1.1.3",
"nativescript-facebook-login": "^0.2.0",
"nativescript-fresco": "file:setup_assets/plugins/nativescript-fresco",
"nativescript-iqkeyboardmanager": "^1.0.1",
"nativescript-logEntries": "^1.0.0",
"nativescript-pulltorefresh": "^1.1.0",
"nativescript-push-notifications": "0.0.15",
"nativescript-snackbar": "^1.0.3",
"nativescript-timedatepicker": "file:setup_assets/plugins/timedatepicker",
"nativescript-zendesk": "file:setup_assets/plugins/nativescript-zendesk",
"simple-text-parser": "1.0.0",
"tns-core-modules": "^2.3.0",
"util": "~0.10.3"
}
}
EDIT 2: I created a sample app and it works, but not for my app
I suspect it's because the platforms / tns-core-modules packages in your app have a lower version than what's specified in package.json.
Can you try following these instructions? So:
$ tns platform remove android
$ tns platform add android
$ tns platform remove ios
$ tns platform add android
$ npm install tns-core-modules#latest --save
I can't get react-art in bower.json in Visual Studio 2015. However, I can get it in package.json.
Package.json:
As a result, I don't see React-art in the wwwroot\lib folder and the react-art not working.
{
"name": "ASP.NET",
"version": "0.0.0",
"devDependencies": {
"gulp": "3.8.11",
"gulp-concat": "2.5.2",
"gulp-cssmin": "0.1.7",
"gulp-uglify": "1.2.0",
"rimraf": "2.2.8",
"react": "0.13.3",
"react-art": "0.13.0"
}
}
bower.json
The reason you've got it package.json is because you've installed a npm package of react-art, not a bower one (which isn't available). But if you're using Browserify, you'll be to use it with the following command
var reactArt = require('react-art');