When I try to build my NS application using Sidekick I get the following error:
[18-07-31 08:06:59.535] (CLI) Command npm install tns-android#3.4.0 --silent --save-exact --save failed with exit code 1 Error output:
[18-07-31 08:06:59.535] (CLI) Unhandled rejection Error: Integrity check failed:
[18-07-31 08:06:59.535] (CLI) Wanted: sha512-UGlRKABh3ZZnhZq8hKc19NIkWNiFpuKNri8fMOjuV6h6qsVVf+ua3g3JqUJoufkZo95yhERjTBa8nkV3RY3g+g==
[18-07-31 08:06:59.535] (CLI) Found: sha512-zX507Sx/iLCoCgqUwF9e9HtFzot1piqis7SEQQQy9TxNBkd4KdRd+74vw9YjGb51QMKHdOOHYkC3q+9XtU7fNw==
[18-07-31 08:06:59.535] (CLI) at checksumError (/usr/lib/node_modules/npm/node_modules/cacache/lib/content/write.js:155:13)
[18-07-31 08:06:59.535] (CLI) at write (/usr/lib/node_modules/npm/node_modules/cacache/lib/content/write.js:33:22)
[18-07-31 08:06:59.535] (CLI) at putData (/usr/lib/node_modules/npm/node_modules/cacache/put.js:11:10)
[18-07-31 08:06:59.535] (CLI) at Object.x.put (/usr/lib/node_modules/npm/node_modules/cacache/locales/en.js:28:37)
[18-07-31 08:06:59.535] (CLI) at readFileAsync.then.data (/usr/lib/node_modules/npm/node_modules/pacote/lib/fetchers/file.js:38:28)
[18-07-31 08:06:59.535] (CLI) at tryCatcher (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
[18-07-31 08:06:59.535] (CLI) at Promise._settlePromiseFromHandler (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
[18-07-31 08:06:59.535] (CLI) at Promise._settlePromise (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
[18-07-31 08:06:59.535] (CLI) at Promise._settlePromise0 (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
[18-07-31 08:06:59.535] (CLI) at Promise._settlePromises (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18)
[18-07-31 08:06:59.535] (CLI) at Promise._fulfill (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:638:18)
[18-07-31 08:06:59.535] (CLI) at /usr/lib/node_modules/npm/node_modules/bluebird/js/release/nodeback.js:42:21
[18-07-31 08:06:59.535] (CLI) at /usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:78:16
[18-07-31 08:06:59.535] (CLI) at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)
[18-07-31 08:07:00.969] (CLI) bc_BnGC7LDWhYFdbMASM3
[18-07-31 08:07:06.156] Build failed.
I can build locally using VS Code, but the cloud build fails. Below is my package.json:
{
"name": "myapp",
"version": "3.0.0",
"description": "",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "com.company.myapp",
"tns-android": {
"version": "3.4.0"
},
"tns-ios": {
"version": "3.4.0"
}
},
"dependencies": {
"moment": "2.20.1",
"moment-timezone": "0.5.14",
"nativescript-appversion": "1.4.1",
"nativescript-zendesk": "file:nativescript-zendesk-1.0.0.tgz",
"nativescript-email": "1.5.1",
"nativescript-exit": "1.0.1",
"nativescript-fingerprint-auth": "6.0.3",
"nativescript-iqkeyboardmanager": "1.2.0",
"nativescript-loading-indicator": "2.4.0",
"nativescript-masked-text-field": "2.0.2",
"nativescript-numeric-keyboard": "3.0.3",
"nativescript-pdf-view": "2.0.1",
"nativescript-phone": "1.3.1",
"nativescript-push-notifications": "1.1.3",
"nativescript-theme-core": "1.0.4",
"nativescript-ui-calendar": "^3.5.1",
"nativescript-zendesk-with-chat": "0.2.0",
"tns-core-modules": "^3.4.0"
},
"devDependencies": {
"babel-traverse": "6.4.5",
"babel-types": "6.4.5",
"babylon": "6.4.5",
"lazy": "1.0.11",
"nativescript-dev-typescript": "0.5.1",
"tns-platform-declarations": "^3.4.0",
"typescript": "2.5.3"
}
}
I cannot find any information on this error. Any assistance would be highly appreciated.
EDIT: I tried removing and adding the android platform and got the same error.
I also opened an issue here.
Thank you.
I could not figure out the reason for this, but after removing the node_modules, hooks, removing both platforms and adding them back on, suddenly everything works again.
It seems that sometimes the project creates some internal conflicts and clearing everything up and starting fresh works.
Related
I'm using create-react-app with a backend application written on Python (using starlette, ariadne and uvicorn) on OSX.
The application was previously running using pipenv. After installing poetry through brew however (brew install poetry), it seems like CRA's proxy stopped working. I suspect this has something to do with homebrew but I have no idea what it is.
Here is my package.json config
{
"name": "chat-ariadne-frontend",
"version": "0.1.0",
"private": true,
"proxy": "http://localhost:8000",
"dependencies": {
"#apollo/client": "^3.5.10",
"#testing-library/jest-dom": "^5.16.2",
"#testing-library/react": "^12.1.3",
"#testing-library/user-event": "^13.5.0",
"antd": "^4.18.9",
"graphql": "^16.3.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router": "^6.2.2",
"react-router-dom": "^6.2.2",
"react-scripts": "5.0.0",
"subscriptions-transport-ws": "^0.11.0",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
I'm running the server using poetry run uvicorn app. However, I get the following error in the console:
Proxy error: Could not proxy request /graphql from localhost:3000 to http://localhost:8000.
See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).
Node version
node -v
v17.6.0
Operating System
OS X Big Sur (version 11.5.2)
Homebrew configuration
HOMEBREW_VERSION: 3.4.1
ORIGIN: https://github.com/Homebrew/brew
HEAD: ea0ddc3297739b7380887d4a7e6b6590c314dca9
Last commit: 2 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 49d411c9fe7e7cd2fba32e76ecbcd5a049556b73
Core tap last commit: 3 hours ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_CORE_GIT_REMOTE: https://github.com/Homebrew/homebrew-core
HOMEBREW_MAKE_JOBS: 4
Homebrew Ruby: 2.6.8 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8/bin/ruby
CPU: quad-core 64-bit kabylake
Clang: 13.0.0 build 1300
Git: 2.23.0 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
macOS: 11.5.2-x86_64
CLT: 13.2.0.0.1.1638488800
Xcode: N/A
I'm getting this error when i deploy my NodeJS app to Heroku server.
2019-08-27T05:54:03.597197+00:00 heroku[web.1]: State changed from starting to crashed
2019-08-27T05:54:03.569746+00:00 heroku[web.1]: Process exited with status 1
2019-08-27T05:59:55.107447+00:00 heroku[web.1]: State changed from crashed to starting
2019-08-27T05:59:58.079934+00:00 heroku[web.1]: Starting process with command `npm start`
2019-08-27T06:00:00.687008+00:00 heroku[web.1]: State changed from starting to crashed
2019-08-27T06:00:00.660988+00:00 heroku[web.1]: Process exited with status 1
2019-08-27T06:00:00.452248+00:00 app[web.1]: > realtime-chat#1.0.0 start /app
2019-08-27T06:00:00.452250+00:00 app[web.1]: > node index.js
2019-08-27T06:00:00.452252+00:00 app[web.1]:
2019-08-27T06:00:00.574510+00:00 app[web.1]: /app/index.js:1
2019-08-27T06:00:00.574514+00:00 app[web.1]: import express from "express";
2019-08-27T06:00:00.574517+00:00 app[web.1]: ^^^^^^^
2019-08-27T06:00:00.574519+00:00 app[web.1]:
2019-08-27T06:00:00.581327+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2019-08-27T06:00:00.581759+00:00 app[web.1]: npm ERR! errno 1
2019-08-27T06:00:00.582977+00:00 app[web.1]: npm ERR! realtime-chat#1.0.0 start: `node index.js`
2019-08-27T06:00:00.583139+00:00 app[web.1]: npm ERR! Exit status 1
2019-08-27T06:00:00.583436+00:00 app[web.1]: npm ERR!
2019-08-27T06:00:00.583640+00:00 app[web.1]: npm ERR! Failed at the realtime-chat#1.0.0 start script.
2019-08-27T06:00:00.583830+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2019-08-27T06:00:00.593702+00:00 app[web.1]:
My config: package.json file.
{
"name": "realtime-chat",
"version": "1.0.0",
"description": "sjc-realtimechat",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "babel-node index.js",
"postinstall": "bower cache clean && bower install"
},
"keywords": [
"sjc"
],
"author": "sjc-bui",
"license": "ISC",
"dependencies": {
"babel-cli": "^6.26.0",
"babel-preset-env": "^1.7.0",
"bcrypt": "^3.0.6",
"bluebird": "^3.5.5",
"body-parser": "^1.19.0",
"bower": "^1.8.8",
"connect-mongo": "^3.0.0",
"cookie-parser": "^1.4.4",
"dotenv": "^8.0.0",
"ejs": "^2.6.2",
"emojione": "^4.5.0",
"express": "^4.17.1",
"express-flash": "0.0.2",
"express-session": "^1.16.2",
"express-validator": "^6.1.1",
"fs-extra": "^7.0.1",
"google-translate": "^2.2.0",
"http": "0.0.0",
"https": "^1.0.0",
"lodash": "^4.17.11",
"moment": "^2.24.0",
"mongoose": "^5.6.4",
"multer": "^1.4.1",
"nodemailer": "^4.4.2",
"passport": "^0.4.0",
"passport-google-oauth": "^2.0.0",
"passport-local": "^1.0.0",
"passport.socketio": "^3.7.0",
"request": "^2.88.0",
"socket.io": "^2.2.0",
"uuid": "^3.3.2"
},
"devDependencies": {}
}
My config: Procfile file
web: npm start
i'm trying to run babel-node index.js on server. but got this error
npm ERR! realtime-chat#1.0.0 start: node index.js
I was searching to fix it but still got this error. Please help.
Update
Dependences already installed but still got "npm start" error.
Update all required dependencies in your package.json.
package.json should be something similar to this :
{
"name": "sample name",
"version": "version details goes here",
"description": "description goes here",
"main": "index.js",
"scripts": {
"start": "babel-node index.js",
"dev": "nodemon --exec babel-node index.js",
"test": "mocha --require babel-core/register test/*.js",
"compile": "babel src --out-dir .compiled --source-maps --watch",
"postinstall": "bower cache clean && bower install"
},
"dependencies": {
"express": "^4.9.8",
"other dependencies"
},
"engines": {
"node": "put node version details here"
}
}
update your bablerc file as below:
babelrc content
{
"presets": ["#babel/preset-env"]
}
Babel node is missing from your dependencies list.
also, see this below guide for more details:
https://devcenter.heroku.com/articles/deploying-nodejs
you cannot use
import express from "express"
this is ES-15 modules and Node.js does not support this. React supports this. node.js runtime has support for common.js modules which should be like this:
const express=require("express")
this is the message I read in the console :
the Firebase plugin is not installed when trying to run my project on a device on Xcode.
I have recently downgraded to Firebase 4.8.0 for dependencies compatibility issues.
I made sure to add my GoogleService-info.plist to the root of my ionic project and to the Xcode project.
I checked my node_modules: #ionic-native/firebase. everything is there
There is no error. The app runs properly, excepts that the Firebase plugin does not seem to be found.
I have tried to uninstall et re-install. no success
What to do in this case?
this is my package.json:
{
"name": "authNotificationTest",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"#angular/animations": "5.2.10",
"#angular/common": "5.2.10",
"#angular/compiler": "5.2.10",
"#angular/compiler-cli": "5.2.10",
"#angular/core": "5.2.10",
"#angular/forms": "5.2.10",
"#angular/http": "5.2.10",
"#angular/platform-browser": "5.2.10",
"#angular/platform-browser-dynamic": "5.2.10",
"#ionic-native/core": "4.7.0",
"#ionic-native/fcm": "^4.7.0",
"#ionic-native/firebase": "^4.7.0",
"#ionic-native/splash-screen": "4.7.0",
"#ionic-native/status-bar": "4.7.0",
"#ionic/storage": "2.1.3",
"angularfire2": "5.0.0-rc.3",
"cordova-browser": "5.0.3",
"cordova-ios": "4.5.4",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-fcm": "^2.1.2",
"cordova-plugin-fcm-plus": "git+https://github.com/guyromb/cordova-plugin-fcm-plus.git",
"cordova-plugin-firebase": "^1.0.2",
"cordova-plugin-ionic-keyboard": "^2.0.5",
"cordova-plugin-ionic-webview": "^1.2.1",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-whitelist": "^1.3.3",
"firebase": "^4.8.0",
"ionic-angular": "3.9.2",
"ionicons": "3.0.0",
"rxjs": "5.5.10",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.26"
},
"devDependencies": {
"#ionic/app-scripts": "3.1.9",
"typescript": "~2.6.2"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-fcm": {},
"cordova-plugin-firebase": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-ionic-keyboard": {}
}
}
}
and, my ionic info:
li packages: (/usr/local/lib/node_modules)
#ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
#ionic/app-scripts : 3.1.9
Cordova Platforms : browser 5.0.3 ios 4.5.4
Ionic Framework : ionic-angular 3.9.2
System:
Node : v9.11.1
npm : 6.0.0
OS : macOS High Sierra
Xcode : Xcode 9.3 Build version 9E145
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
Try to run:-
ionic cordova plugin add cordova-plugin-firebase
npm install --save #ionic-native/firebase
For more info visit:- https://ionicframework.com/docs/native/firebase/
I just upgraded my from ionic 2 to ionic 3. but now it is stuck at splash screen with error:
Cannot find module "d3"
here is my ionic info :
Cordova CLI: 6.4.0
Ionic Framework Version: 3.0.1
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.3.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.9.1
Xcode version: Not installed
Package.json
{
"name": "MyApp",
"author": "",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
//dependencies starts here. have updated these according to ionic 3
"#angular/common": "4.0.0",
"#angular/compiler": "4.0.0",
"#angular/compiler-cli": "4.0.0",
"#angular/core": "4.0.0",
"#angular/forms": "4.0.0",
"#angular/http": "4.0.0",
"#angular/platform-browser": "4.0.0",
"#angular/platform-browser-dynamic": "4.0.0",
"#angular/platform-server": "2.2.1",
"#ionic-native/core": "^3.10.3",
"#ionic-native/keyboard": "^3.4.4",
"#ionic-native/splash-screen": "3.4.2",
"#ionic-native/status-bar": "3.4.2",
"#ionic/cloud-angular": "^0.10.0",
"#ionic/storage": "2.0.1",
"angular2-moment": "^1.1.0",
"google-libphonenumber": "^2.0.14",
"ionic-angular": "3.0.1",
"ionic-gallery-modal": "0.0.7",
"ionic-native": "2.2.11",
"ionicons": "3.0.0",
"rxjs": "5.1.1",
"sw-toolbox": "3.4.0",
"zone.js": "^0.8.4"
},
"devDependencies": {
"#ionic/app-scripts": "1.3.0",
"#ionic/cli-plugin-cordova": "1.1.2",
"#ionic/cli-plugin-ionic-angular": "1.1.2",
"typescript": "2.1"
},
"cordovaPlugins": [
"ionic-plugin-keyboard",
"cordova-plugin-whitelist",
"cordova-plugin-console",
"cordova-plugin-statusbar",
"cordova-plugin-device",
"cordova-plugin-splashscreen",
"cordova-sqlite-storage",
"cordova-plugin-x-toast",
"cordova-plugin-camera",
"cordova-plugin-compat",
"cordova-plugin-image-picker",
"cordova.plugins.diagnostic",
{
"id": "phonegap-plugin-push",
"locator": "phonegap-plugin-push",
"variables": {
"SENDER_ID": "XXXXXXXXXXX"
}
},
"cordova-plugin-appavailability",
"ionic-plugin-deploy",
"cordova-plugin-x-socialsharing",
"cordova-plugin-screen-orientation",
"com.hutchind.cordova.plugins.streamingmedia",
"cordova-plugin-contacts",
"ionic-plugin-deploy",
"cordova-plugin-x-socialsharing",
{
"locator": "https://github.com/napolitano/cordova-plugin-intent",
"id": "com.napolitano.cordova.plugin.intent"
},
"cordova-plugin-screen-orientation",
"cordova-plugin-file",
"cordova-plugin-file-transfer"
],
"cordovaPlatforms": [
{
"platform": "android",
"version": "",
"locator": "android"
}
],
"description": "An Ionic project"
}
Followed this link for the upgrade
Install d3 to package.json.
npm install d3 --save
Install the type declarations from npm:
npm install #types/d3 --save-dev
You dont need typings. It is deprecated.
The same for jquery.
used following set of commands to solve:
npm install d3#vSpecify_your_version --save
npm install -g typings --save
typings search d3 --save
typings install d3 --save
npm install jquery --save
typings install dt~jquery --global --save
npm install aws-sdk --save
Then delete the node_modules folder of your project and do npm install in your projects CMD/Terminal.
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