I am trying to understand the output of
yarn info ts-node --json
{
"value": "ts-node#npm:8.5.4",
"children": {
"Instances": 1,
"Version": "8.5.4",
"Exported Binaries": [
"ts-node",
"ts-script"
],
"Dependencies": [
{
"descriptor": "arg#npm:^4.1.0",
"locator": "arg#npm:4.1.3"
},
{
"descriptor": "diff#npm:^4.0.1",
"locator": "diff#npm:4.0.2"
},
{
"descriptor": "make-error#npm:^1.1.1",
"locator": "make-error#npm:1.3.6"
},
{
"descriptor": "source-map-support#npm:^0.5.6",
"locator": "source-map-support#npm:0.5.21"
},
{
"descriptor": "yn#npm:^3.0.0",
"locator": "yn#npm:3.1.1"
}
]
}
}
So far I understand ts-node version 8.5.4 is installed
But what does "Exported Binaries" signify? I thought it would mean direct dependency but I don't have ts-script in my package.json.
Related
This is my package.json build data:
"build": {
"appId": "name.desktop",
"productName": "name",
"beforePack": "electron/beforePack.js",
"extraResources": [
{
"from": "bin/${os}",
"to": "bin",
"filter": [
"**/*"
]
}
],
"files": [
"build/**/*",
"electron/**/*",
"package.json"
],
"extends": null,
"mac": {
"target": "dmg",
"type": "distribution"
},
"win": {
"target": [
"portable",
"nsis"
]
},
"linux": {
"target": "AppImage"
}
}
I'm looking to add "portable" to the windows portable file name, so that the .exe is "name 1.0.0 portable.exe" instead of "name 1.0.0.exe"
It is possible to explicitely define the generated file names at each relevant level in the package.json file by making use of an "artifactName" property.
This is documented in the Overridable per Platform Options section of the Common Configuration - electron-builder page:
Following options can be set also per platform (top-level keys mac, linux and win) if need.
artifactName String | “undefined” - The artifact file name template. Defaults to ${productName}-${version}.${ext} (some target can have other defaults, see corresponding options).
which indirectly refers to the File Macros section of the File Patterns - electron-builder page.
In your specific case, you'll have to add the following "artifactName" property to your package.json file at the Windows version level:
"artifactName": "${name} ${version} portable.${ext}",
i.e.:
"build": {
"appId": "name.desktop",
"productName": "name",
"beforePack": "electron/beforePack.js",
"extraResources": [
{
"from": "bin/${os}",
"to": "bin",
"filter": [
"**/*"
]
}
],
"files": [
"build/**/*",
"electron/**/*",
"package.json"
],
"extends": null,
"mac": {
"target": "dmg",
"type": "distribution"
},
"win": {
"artifactName": "${name} ${version} portable.${ext}",
"target": [
"portable",
"nsis"
]
},
"linux": {
"target": "AppImage"
}
}
I'm facing a problem while I'm running this commmand composer require drush/drush but it didn't work for me and I got this error message:
[InvalidArgumentException] Could not find package drush/drush. It
was however found via repository search, which indicates a consistency
issue with the repository.
I'm using Drupal 8.9.18, Drush version : 10.6.1 and my PHP version is: php7.1.33
my composer.json file :
{
"name": "drupal/legacy-project",
"description": "Project template for Drupal 8 projects with composer following drupal/drupal layout",
"type": "project",
"license": "GPL-2.0-or-later",
"homepage": "https://www.drupal.org/project/drupal",
"support": {
"docs": "https://www.drupal.org/docs/user_guide/en/index.html",
"chat": "https://www.drupal.org/node/314178"
},
"repositories": {
"drupal": {
"type": "composer",
"url": "https://packages.drupal.org/8"
},
"0": {
"type": "composer",
"url": "https://packages.drupal.org/8"
},
"gigyadrupal": {
"type": "git",
"url": "https://github.com/gigya/drupal8.git"
}
},
"require": {
"composer/installers": "^1.2",
"drupal/core-composer-scaffold": "^8.8",
"drupal/core-project-message": "^8.8",
"drupal/core-recommended": "^8.8",
"drupal/core-vendor-hardening": "^8.8",
"drupal/gigya": "^1.7"
},
"conflict": {
"drupal/drupal": "*"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"sort-packages": true
},
"extra": {
"drupal-scaffold": {
"locations": {
"web-root": "./"
}
},
"installer-paths": {
"core": [
"type:drupal-core"
],
"libraries/{$name}": [
"type:drupal-library"
],
"modules/contrib/{$name}": [
"type:drupal-module"
],
"profiles/contrib/{$name}": [
"type:drupal-profile"
],
"themes/contrib/{$name}": [
"type:drupal-theme"
],
"drush/Commands/contrib/{$name}": [
"type:drupal-drush"
],
"modules/custom/{$name}": [
"type:drupal-custom-module"
],
"themes/custom/{$name}": [
"type:drupal-custom-theme"
]
},
"drupal-core-project-message": {
"include-keys": [
"homepage",
"support"
],
"post-create-project-cmd-message": [
"<bg=blue;fg=white> </>",
"<bg=blue;fg=white> Congratulations, you’ve installed the Drupal codebase </>",
"<bg=blue;fg=white> from the drupal/legacy-project template! </>",
"<bg=blue;fg=white> </>",
"",
"<bg=yellow;fg=black>Next steps</>:",
" * Install the site: https://www.drupal.org/docs/8/install",
" * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
" * Get support: https://www.drupal.org/support",
" * Get involved with the Drupal community:",
" https://www.drupal.org/getting-involved",
" * Remove the plugin that prints this message:",
" composer remove drupal/core-project-message"
]
}
}
}
You need to have an installable set of packages. drupal/gigya doesn't really exist (anymore). You also should not be using the drupal/legacy-project at all.
This is the best I came up with, although that's maybe not giving you the version of Gigya you want. Not sure, try it out. Check the updated respositories section and the updated "gigya/gigya-drupal": "*" package name which will always get you the latest master from GitHub.
{
"name": "drupal/legacy-project",
"description": "Project template for Drupal 8 projects with composer following drupal/drupal layout",
"type": "project",
"license": "GPL-2.0-or-later",
"homepage": "https://www.drupal.org/project/drupal",
"support": {
"docs": "https://www.drupal.org/docs/user_guide/en/index.html",
"chat": "https://www.drupal.org/node/314178"
},
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
},
{
"type": "vcs",
"url": "https://github.com/gigya/drupal8"
}
],
"require": {
"composer/installers": "^1.2",
"drupal/core-composer-scaffold": "^8.8",
"drupal/core-project-message": "^8.8",
"drupal/core-recommended": "^8.8",
"drupal/core-vendor-hardening": "^8.8",
"gigya/gigya-drupal": "*"
},
"conflict": {
"drupal/drupal": "*"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"sort-packages": true
},
"extra": {
"drupal-scaffold": {
"locations": {
"web-root": "./"
}
},
"installer-paths": {
"core": [
"type:drupal-core"
],
"libraries/{$name}": [
"type:drupal-library"
],
"modules/contrib/{$name}": [
"type:drupal-module"
],
"profiles/contrib/{$name}": [
"type:drupal-profile"
],
"themes/contrib/{$name}": [
"type:drupal-theme"
],
"drush/Commands/contrib/{$name}": [
"type:drupal-drush"
],
"modules/custom/{$name}": [
"type:drupal-custom-module"
],
"themes/custom/{$name}": [
"type:drupal-custom-theme"
]
},
"drupal-core-project-message": {
"include-keys": [
"homepage",
"support"
],
"post-create-project-cmd-message": [
"<bg=blue;fg=white> </>",
"<bg=blue;fg=white> Congratulations, you’ve installed the Drupal codebase </>",
"<bg=blue;fg=white> from the drupal/legacy-project template! </>",
"<bg=blue;fg=white> </>",
"",
"<bg=yellow;fg=black>Next steps</>:",
" * Install the site: https://www.drupal.org/docs/8/install",
" * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
" * Get support: https://www.drupal.org/support",
" * Get involved with the Drupal community:",
" https://www.drupal.org/getting-involved",
" * Remove the plugin that prints this message:",
" composer remove drupal/core-project-message"
]
}
}
}
When I try to use this app.json:
{
"stack": "heroku-18",
"repository": "https://github.com/OpenHumans/oh-data-source-template",
"logo": "https://avatars.githubusercontent.com/u/3341265?s=280&v=4",
"scripts": {
"postdeploy": "python manage.py init_proj_config"
},
"env": {
"SECRET_KEY": {
"description": "This is set for you and is used to encrypt data.",
"generator": "secret"
},
"OH_CLIENT_ID": {
"description": "See http://openhumans.org/direct-sharing/projects/manage",
"value": ""
},
"OH_CLIENT_SECRET": {
"description": "See http://openhumans.org/direct-sharing/projects/manage",
"value": ""
},
"OH_ACTIVITY_PAGE": {
"description": "See http://openhumans.org/direct-sharing/projects/manage",
"value": ""
},
"APP_BASE_URL ": {
"description": "e.g. https://your-app-name.herokuapp.com - no trailing slash!",
"value": "https://your-app-name.herokuapp.com"
},
"DEBUG": {
"description": "Displays detailed error info for web requests. Set False in production.",
"value": "false"
},
"HEROKU_APP": {
"description": "If true, ALLOWED_HOSTS is set to all.",
"value": "true"
}
},
"addons": [
"coralogix:free-30mbday",
"heroku-redis:hobby-dev",
{
"plan": "heroku-postgresql",
"options": {
"version": "9.5"
}
}
]
}
to deploy from:
https://dashboard.heroku.com/new?template=https%3A%2F%2Fgithub.com%2Fmikepsinn%2Foh-quantimodo-source
I get the error no matter what I set the name to:
I've tried adding the optional name field to the app.json but that doesn't help either.
I want to migrate an Angular app to a {N} code-sharing structure. I used this article to get started. Would you help me solve the below issue? It seems like a mis-configuration.
When I execute:
ng add #nativescript/schematics
I get the following error:
success Saved 1 new dependency.
info Direct dependencies
└─ #nativescript/schematics#0.5.0
info All dependencies
└─ #nativescript/schematics#0.5.0
✨ Done in 3.25s.
Installed packages for tooling via yarn.
Two or more projects are using identical roots. Unable to determine project using current working directory. Using default workspace project instead.
Reading Project Settings
Project settings:
{
"root": "",
"sourceRoot": "src",
"mainName": "main",
"mainPath": "src/main.ts",
"tsConfig": "src/tsconfig.json",
"entryModuleClassName": "RootModule",
"entryModuleImportPath": "./root.module",
"entryModuleName": "Root",
"entryModulePath": "/src/root.module.ts",
"entryComponentClassName": "RootComponent",
"entryComponentImportPath": "./root.component",
"entryComponentName": "Root",
"entryComponentPath": "/src/root.component.ts",
"indexAppRootTag": "app-root"
}
Adding #nativescript/schematics to angular.json
Adding {N} files
Adding App_Resources
Adding NativeScript specific exclusions to .gitignore
Adding NativeScript run scripts to package.json
Adding NativeScript Project ID to package.json
Excluding NativeScript files from web tsconfig
Adding Sample Shared Component
Two or more projects are using identical roots. Unable to determine project using current working directory. Using default workspace project instead.
Two or more projects are using identical roots. Unable to determine project using current working directory. Using default workspace project instead.
Specified module does not exist
My #angular packages are 7.1.1
I use yarn as a package manager.
This is my angular.json:
{
"$schema": "./node_modules/#angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"my-ns-project": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"architect": {
"build": {
"builder": "#angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.json",
"polyfills": "src/polyfills.ts",
"assets": [
// assets
],
"styles": [
// styles
],
"scripts": [
// scripts
]
},
"configurations": {
"hmr": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.hmr.ts"
}
]
},
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
}
}
},
"serve": {
"builder": "#angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "my-ns-project:build"
},
"configurations": {
"hmr": {
"browserTarget": "my-ns-project:build:hmr"
},
"production": {
"browserTarget": "my-ns-project:build:production"
}
}
},
"extract-i18n": {
"builder": "#angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "my-ns-project:build"
}
},
"test": {
"builder": "#angular-devkit/build-angular:karma",
"options": {
"tsConfig": "src/tsconfig.json",
"main": "src/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ts",
"styles": [
// styles
],
"scripts": [
// scripts
],
"assets": [
// assets
]
}
},
"lint": {
"builder": "#angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.json"
],
"exclude": []
}
}
}
},
"my-ns-project-e2e": {
"root": "",
"sourceRoot": "",
"projectType": "application",
"architect": {
"e2e": {
"builder": "#angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "my-ns-project:serve"
}
},
"lint": {
"builder": "#angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"e2e/tsconfig.json"
],
"exclude": []
}
}
}
}
},
"defaultProject": "my-ns-project",
"cli": { "defaultCollection": "#nativescript/schematics" },
"schematics": {
"#schematics/angular:component": {
"prefix": "app",
"styleext": "css"
},
"#schematics/angular:directive": {
"prefix": "app"
}
}
}
Any help is highly appreciated!
Need to follow the following steps
Create a new angular app using - ng new my-app
Navigate to my-app folder
Execute command - ng add #nativescript/schematics
Finally execute tns run android --bundle - this will generate an auto generated page in emulator.
I see some differences in the project settings.
I get the following error when trying to connect to my SQL Server Express RDS instance over AWS Lambda using System.Data.SqlClient:
"errorType": "PlatformNotSupportedException",
"errorMessage": "Operation is not supported on this platform.",
"stackTrace": [
"at System.Runtime.InteropServices.OSPlatform.get_Windows()",
"at System.Data.SqlClient.SNI.SNITCPHandle.d__22.MoveNext()"
]
I build the deploy package using Amazon.Lambda.Tools. Running the function and connecting to the database from local works fine, but fails when trying to run it on AWS Lambda.
Here is my project.json:
{
"version": "1.0.0-*",
"description": "AWS lambda Console Application",
"authors": [ "" ],
"packOptions": {
"tags": [],
"projectUrl": "",
"licenseUrl": ""
},
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0"
},
"Newtonsoft.Json": "9.0.1",
"Amazon.Lambda.Core": "1.0.0*",
"Amazon.Lambda.Serialization.Json": "1.0.1",
"Amazon.Lambda.Tools": {
"type": "build",
"version": "1.0.0-preview1"
},
"Dapper": "1.50.2",
"System.Data.SqlClient": "4.3.0"
},
"tools": {
"Amazon.Lambda.Tools": "1.0.0-preview1"
},
"commands": {
"AwsLambda": "run"
},
"frameworks": {
"netcoreapp1.0": {
"imports": "dnxcore50"
}
}
}
Had the same problem and for me just changing
"System.Data.SqlClient": "4.3.0"
to
"System.Data.SqlClient": "4.1.0"
worked for me. I did not have to change the NetCore.App dependencies.
Explicitly add reference to
"System.Data.SqlClient": "4.1.0",
"System.Runtime.InteropServices.RuntimeInformation": "4.0.0"
solves the problem.
Can you try to change
"System.Data.SqlClient": "4.3.0"
to
"System.Data.SqlClient": "4.1.0"
and change
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0"
},
to
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.1"
},