I initialized a JHipster project and tried to deploy it to heroku. I did nothing more than that and get the error below. Im not sure where the problem is, either the Jhipster release im using or Heroku i think. Should i try switching to another version of JHipster, or could this possibly be an issue of my local setup (npm-, node-, java-, gralde-version)?
JHipster Version(s)
generator-jhipster#6.10.1
JHipster configuration
{
"generator-jhipster": {
"promptValues": {
"packageName": "io.profit.testify",
"nativeLanguage": "en"
},
"jhipsterVersion": "6.10.1",
"applicationType": "monolith",
"baseName": "priv",
"packageName": "io.profit.testify",
"packageFolder": "io/profit/testify",
"serverPort": "8080",
"authenticationType": "jwt",
"cacheProvider": "ehcache",
"enableHibernateCache": false,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "h2Disk",
"prodDatabaseType": "postgresql",
"searchEngine": false,
"messageBroker": false,
"serviceDiscoveryType": false,
"buildTool": "gradle",
"enableSwaggerCodegen": false,
"jwtSecretKey": "YourJWTSecretKeyWasReplacedByThisMeaninglessTextByTheJHipsterInfoCommandForObviousSecurityReasons",
"embeddableLaunchScript": false,
"useSass": true,
"clientPackageManager": "npm",
"clientFramework": "angularX",
"clientTheme": "none",
"clientThemeVariant": "",
"creationTimestamp": 1595760910320,
"testFrameworks": [],
"jhiPrefix": "jhi",
"entitySuffix": "",
"dtoSuffix": "DTO",
"otherModules": [],
"enableTranslation": true,
"nativeLanguage": "en",
"languages": ["en", "de"],
"blueprints": [],
"herokuAppName": "afternoon-falls-71420",
"herokuDeployType": "git",
"herokuJavaVersion": "11"
}
}
Environment and Tools
java version "11.0.6" 2020-01-14 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.6+8-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.6+8-LTS, mixed mode)
git version 2.20.1.windows.1
node: v12.2.0
npm: 6.9.0
yeoman: 3.1.1
Error From Heroku Console:
Downloading https://services.gradle.org/distributions/gradle-6.5-bin.zip
remote: .................................................................................................
remote: To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/6.5/userguide/gradle_daemon.html.
remote: Daemon will be stopped at the end of the build stopping after processing
remote: > Task :bootBuildInfo
remote: > Task :nodeSetup SKIPPED
remote: > Task :npmSetup SKIPPED
remote: > Task :npmInstall FAILED
remote:
remote: FAILURE: Build failed with an exception.
remote:
remote: * What went wrong:
remote: Execution failed for task ':npmInstall'.
remote: > A problem occurred starting process 'command 'npm''
If you want to set the correct gradle task you can set it manually via heroku cli:
heroku config:set GRADLE_TASK="stage -Pprod -PnodeInstall"
In case the buildpack is not correctly set configure it via
heroku buildpacks:add heroku/gradle
After that try pushing again via
git push heroku master
And the build should work again.
Related
I am trying to deploy kypo cyber range and am following its official guide. While deploying the whole range using ansible-playbook, I am stuck on above error:
TASK [docker : install prerequisites] ******************************************************************
fatal: [192.168.211.208]: FAILED! => {"changed": false, "msg": "Failed to update apt cache: unknown reason"}
I have manually checked apt-get update which initially gave me a notification of:
N: Skipping acquire of configured file 'stable/binary-i386/Packages' as repository 'https://download.docker.com/linux/ubuntu focal InRelease' doesn't support architecture 'i386'
I followed this to add [amd=64] to repository which cleaned the error. Now apt-get update runs with without any warnings or errors, but ansible-playbook keeps on generating this error.
I changed the verbosity level and got:
fatal: [192.168.211.208]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"allow_unauthenticated": false,
"autoclean": false,
"autoremove": false,
"cache_valid_time": 0,
"deb": null,
"default_release": null,
"dpkg_options": "force-confdef,force-confold",
"force": false,
"force_apt_get": false,
"install_recommends": null,
"name": [
"apt-transport-https",
"ca-certificates"
],
"only_upgrade": false,
"package": [
"apt-transport-https",
"ca-certificates"
],
"policy_rc_d": null,
"purge": false,
"state": "present",
"update_cache": true,
"update_cache_retries": 5,
"update_cache_retry_max_delay": 12,
"upgrade": null
}
},
"msg": "Failed to update apt cache: unknown reason"
}
How can I fix this?
In Kypo CRP, while playing the ansible playbook the error was actually coming from one of the instances of openstack which I found out by increasing verbosity in command -vvvv. Everything was fine with the host machine. So I look for changes in instances and the root cause was there was no internet access. Once I managed to connect them to external world, the error went away.
I'm getting this error when I run the tests on github pages, the app uses rails as backend and svelte for front end.
TypeError: chalk.Instance is not a constructor
at new TsconfigPathsPlugin (/home/runner/.cache/Cypress/9.4.1/Cypress/resources/app/node_modules/tsconfig-paths-webpack-plugin/lib/plugin.js:17:47)
at addTypeScriptConfig (/home/runner/.cache/Cypress/9.4.1/Cypress/resources/app/packages/server/node_modules/#cypress/webpack-batteries-included-preprocessor/index.js:54:37)
at Object.handler (/home/runner/.cache/Cypress/9.4.1/Cypress/resources/app/packages/server/node_modules/#cypress/webpack-batteries-included-preprocessor/index.js:166:7)
at invoke (/home/runner/.cache/Cypress/9.4.1/Cypress/resources/app/packages/server/lib/plugins/child/run_plugins.js:22:16)
at /home/runner/.cache/Cypress/9.4.1/Cypress/resources/app/packages/server/lib/plugins/util.js:45:14
at tryCatcher (/home/runner/.cache/Cypress/9.4.1/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/util.js:16:23)
at Function.Promise.attempt.Promise.try (/home/runner/.cache/Cypress/9.4.1/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/method.js:39:29)
at Object.wrapChildPromise (/home/runner/.cache/Cypress/9.4.1/Cypress/resources/app/packages/server/lib/plugins/util.js:44:23)
at Object.wrap (/home/runner/.cache/Cypress/9.4.1/Cypress/resources/app/packages/server/lib/plugins/child/preprocessor.js:28:8)
at execute (/home/runner/.cache/Cypress/9.4.1/Cypress/resources/app/packages/server/lib/plugins/child/run_plugins.js:119:27)
at EventEmitter.<anonymous> (/home/runner/.cache/Cypress/9.4.1/Cypress/resources/app/packages/server/lib/plugins/child/run_plugins.js:209:5)
at EventEmitter.emit (events.js:210:5)
at process.<anonymous> (/home/runner/.cache/Cypress/9.4.1/Cypress/resources/app/packages/server/lib/plugins/util.js:19:22)
at process.emit (events.js:210:5)
at process.emit (/home/runner/.cache/Cypress/9.4.1/Cypress/resources/app/node_modules/source-map-support/source-map-support.js:495:21)
at emit (internal/child_process.js:876:12)
at processTicksAndRejections (internal/process/task_queues.js:81:21)
I have upgraded cypress and I still get this error I can't find references to similar error. Also have reinstalled everything fresh and did not solve the issue. Also checked my tsconfig.json
{
"compilerOptions": {
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": ["es6", "dom"],
"module": "es6",
"moduleResolution": "node",
"baseUrl": "./",
"paths": {
"*": ["node_modules/*", "app/javascript/*", "app/webpacker/*"],
"#/*": ["app/webpacker/packs/*"]
},
"sourceMap": true,
"target": "es6",
"noEmit": true,
"types": ["cypress", "cypress-file-upload"]
},
"exclude": ["**/*.spec.ts", "node_modules", "vendor", "public"],
"compileOnSave": false
}
How to install bazel for golang application building in VScode?
There is no direct support for Bazel yet, as per golang/go issue 37205 ("x/tools/gopls: support for bazel-based projects")
bazelbuild/rules_go wiki/Editor-and-tool-integration has a design document for building editor and tool integration: a new gopackagesdriver binary that integrates Bazel+rules_go with golang.org/x/tools/go/packages.
But it is not fully implemented yet (Q1 2022).
In the meantime, you can follow Bazel IDE setup, which involves:
Create a launcher script, say tools/gopackagesdriver.sh:
#!/usr/bin/env bash
exec bazel run -- #io_bazel_rules_go//go/tools/gopackagesdriver "${#}"
adding in the .vscode/settings.json of your workspace:
{
"go.goroot": "${workspaceFolder}/bazel-${workspaceFolderBasename}/external/go_sdk",
"go.toolsEnvVars": {
"GOPACKAGESDRIVER": "${workspaceFolder}/tools/gopackagesdriver.sh"
},
"go.enableCodeLens": {
"references": false,
"runtest": false
},
"gopls": {
"build.directoryFilters": [
"-bazel-bin",
"-bazel-out",
"-bazel-testlogs",
"-bazel-mypkg",
],
"formatting.gofumpt": true,
"formatting.local": "github.com/my/mypkg",
"ui.completion.usePlaceholders": true,
"ui.semanticTokens": true,
"ui.codelenses": {
"gc_details": false,
"regenerate_cgo": false,
"generate": false,
"test": false,
"tidy": false,
"upgrade_dependency": false,
"vendor": false
},
},
"go.useLanguageServer": true,
"go.buildOnSave": "off",
"go.lintOnSave": "off",
"go.vetOnSave": "off",
}
I have a large node js application. It manages HTTP REST requests. It was written in typescript. I am able to compile and run the application without any problem. In VSCode, I have a pre-launch task which basically compiles the code.
When I want to debug the application or try to add breakpoints in it with vscode, it gives me similar error messages like below:
Could not read source map for file:///Users/user/Developer/yoauto/engine/node_modules/#google-cloud/paginator/build/src/resource-stream.js: ENOENT: no such file or directory, open '/Users/user/Developer/yoauto/engine/node_modules/#google-cloud/paginator/build/src/resource-stream.js.map'
Please find my tsconfig.json and launch.json below:
{
"compilerOptions": {
"outDir": "dist/",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"strictBindCallApply": true,
"allowJs": false,
"checkJs": false,
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"forceConsistentCasingInFileNames": true,
"importHelpers": true,
"noEmitHelpers": true,
"lib": ["dom", "es2016", "es2017.object"],
"target": "es6",
"module": "commonjs",
"noUnusedLocals": false,
"noUnusedParameters": false,
"noEmitOnError": true,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": false,
"noImplicitReturns": false,
"noImplicitThis": false,
"strictNullChecks": false,
"pretty": true,
"removeComments": false,
"sourceMap": true,
"moduleResolution": "node",
"baseUrl": "src",
"paths": {
"#/*": ["./*"],
"#services/*": ["./core/services/*"],
"#domains/*": ["./core/domains/*"],
"#providers/*": ["./core/providers/*"],
"#controllers/*": ["./core/application/controllers/*"]
},
"resolveJsonModule": true
},
"include": ["./setup.ts", "./src/*", "./src/config/*.json", "setup.ts", "./_deploy/*.yaml"],
"exclude": [
"dist",
"node_modules",
"**/**/**.spec.ts",
"**/**/**.e2e.ts",
"**/**/**.spec.ts",
"**/__tests__/**"
]
}
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/dist/setup.js",
// "preLaunchTask": "tsc: build - tsconfig.json",
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
]
}
]
}
It was working yesterday. I do not know the problem. I found the closest issue on github but not sure it's relevant though.
Publish sources and source maps to npm
I think the problem is VSCode itself since I am able to debug the application with the latest webstorm without any problem (might be wrong)
Thanks for your help
Update :
I have downgraded my vscode installation to 1.46.1 from 1.47 and it worked so I am certain that something is not right with vscode 1.47
this seems to be a problem in vsCode like spotted here https://github.com/microsoft/vscode/issues/102042.
To solve it, add those lines to your launch.json config:
"type": "pwa-node",
"resolveSourceMapLocations": [
"${workspaceFolder}/**",
"!**/node_modules/**" // this lines prevent reading source maps from node_modules
],
Tell me if it helps :)
Overview of the issue
I am getting NPM error while creating a simple project using JHipster or Yo Jhipster command
Related issues
Yes, I have checked for a similar issue but didn't find any issue similar to this with NPM.
Suggest a Fix
I think dependencies are available in staging in my case but the project is not getting its path properly.
JHipster Version(s)
5.7.2
JHipster configuration
INFO! Using JHipster version installed globally
INFO! Executing jhipster: info
INFO! Options: from-cli: true
Welcome to the JHipster Information Sub-Generator
JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
"generator-jhipster": {
"promptValues": {
"packageName": "com.test"
},
"jhipsterVersion": "5.7.2",
"applicationType": "monolith",
"baseName": "JhipsterFirstApp",
"packageName": "com.test",
"packageFolder": "com/test",
"serverPort": "8080",
"authenticationType": "jwt",
"cacheProvider": "ehcache",
"enableHibernateCache": false,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "h2Disk",
"prodDatabaseType": "mysql",
"searchEngine": "elasticsearch",
"messageBroker": false,
"serviceDiscoveryType": false,
"buildTool": "maven",
"enableSwaggerCodegen": false,
"jwtSecretKey": "bXktc2VjcmV0LXRva2VuLXRvLWNoYW5nZS1pbi1wcm9kdWN0aW9uLWFuZC10by1rZWVwLWluLWEtc2VjdXJlLXBsYWNl",
"clientFramework": "angularX",
"useSass": false,
"clientPackageManager": "npm",
"testFrameworks": [
"gatling"
],
"jhiPrefix": "jhi",
"otherModules": [],
"enableTranslation": false
}
}
JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions
Environment and Tools
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)
git version 2.16.1.windows.4
node: v10.15.0
npm: 6.5.0
yeoman: 2.0.5
yarn: 1.12.3
INFO! Congratulations, JHipster execution is complete!
Entity configuration(s) entityName.json files generated in the .jhipster directory
I am not sure, I think its related to NPM dependencies.
Browsers and Operating System
I am getting this as error msg on cmd.