Cannot run semantic-release-cli setup for GitHub action - continuous-integration

When running npx semantic-release-cli setup with GitHub Actions for my public repository https://github.com/henrycity/movie-browser-frontend, I got this error
ERR! semantic-release RequestError: Error: Invalid URI "undefined/repos/henrycity/movie-browser-frontend/actions/secrets/public-key"
ERR! semantic-release at new RequestError (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/node_modules/request-promise-core/lib/errors.js:14:15)
ERR! semantic-release at Request.plumbing.callback (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/node_modules/request-promise-core/lib/plumbing.js:87:29)
ERR! semantic-release at Request.RP$callback [as _callback] (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/node_modules/request-promise-core/lib/plumbing.js:46:31)
ERR! semantic-release at self.callback (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/node_modules/request/request.js:185:22)
ERR! semantic-release at Request.emit (events.js:315:20)
ERR! semantic-release at Request.init (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/node_modules/request/request.js:273:17)
ERR! semantic-release at Request.RP$initInterceptor [as init] (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/node_modules/request-promise-core/configure/request2.js:45:29)
ERR! semantic-release at new Request (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/node_modules/request/request.js:127:8)
ERR! semantic-release at request (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/node_modules/request/index.js:53:10)
ERR! semantic-release at /Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/node_modules/request/index.js:100:12
ERR! semantic-release at createSecret (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/src/lib/github-actions.js:36:28)
ERR! semantic-release at module.exports (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/src/lib/github-actions.js:83:9)
ERR! semantic-release at module.exports (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/src/lib/ci.js:50:17)
ERR! semantic-release at processTicksAndRejections (internal/process/task_queues.js:97:5)
ERR! semantic-release at module.exports (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/src/index.js:90:5)
I tried to log the info object in https://github.com/semantic-release/cli/blob/master/src/lib/ci.js. I notice that info.github.endpoint is undefined, which causes the error.
giturl: 'https://github.com/henrycity/movie-browser-frontend.git',
ghrepo: { slug: [ 'henrycity', 'movie-browser-frontend', '' ] },
npm: {
registry: 'https://npm.pkg.github.com/',
authmethod: 'token',
username: 'henrycity',
password: 'xxxx,
token: 'xxxx'
},
github: { token: 'xxxx }
Version: 5.4.1
I wonder what causes the error.

The issue is fixed in version 5.4.3.

Related

Unknown word error building a Chrome Extension using Laravel-mix with vue3

I'm in the process of building a chrome-extension manifest Version3 in vue.js 3 using laravel-mix. In order to prevent styles leaking between the extension code and the current browser tab, I've loaded the content-scripts code into a shadow-dom element. This is working however as the default compiling process from laravel-mix is to add the styles in a style tag in the head of the document, currently the css styling is being prevented from reaching the very place it should be isolated to. I've tried following the laravel-mix documentation that suggests using a function that lazy loads the style tag within the shadow dom element however I am getting this error and cannot work out what is wrong - guessing there is missing configs. Thanks in advance for any help.
Error Details
ERROR in ./src/assets/css/content_shinego.css
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/laravel-mix/node_modules/postcss-loader/dist/cjs.js):
SyntaxError
(4:7) C:\Users\ollie\Documents\Shine\ChromeExtensionScreenCapture\draft\src\assets\css\content_shinego.css Unknown word
2 | var exported = {};
3 |
4 | import API from "!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js";
| ^
5 | import domAPI from "!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js";
6 |
at processResult (C:\Users\ollie\Documents\Shine\ChromeExtensionScreenCapture\draft\node_modules\webpack\lib\NormalModule.js:758:19)
at C:\Users\ollie\Documents\Shine\ChromeExtensionScreenCapture\draft\node_modules\webpack\lib\NormalModule.js:860:5
at C:\Users\ollie\Documents\Shine\ChromeExtensionScreenCapture\draft\node_modules\loader-runner\lib\LoaderRunner.js:400:11
at C:\Users\ollie\Documents\Shine\ChromeExtensionScreenCapture\draft\node_modules\loader-runner\lib\LoaderRunner.js:252:18
at context.callback (C:\Users\ollie\Documents\Shine\ChromeExtensionScreenCapture\draft\node_modules\loader-runner\lib\LoaderRunner.js:124:13)
at Object.loader (C:\Users\ollie\Documents\Shine\ChromeExtensionScreenCapture\draft\node_modules\laravel-mix\node_modules\postcss-loader\dist\index.js:140:7)
ERROR in ./src/assets/css/popup_shinego.css
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/laravel-mix/node_modules/postcss-loader/dist/cjs.js):
SyntaxError
(4:7) C:\Users\ollie\Documents\Shine\ChromeExtensionScreenCapture\draft\src\assets\css\popup_shinego.css Unknown word
2 | var exported = {};
3 |
4 | import API from "!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js";
| ^
5 | import domAPI from "!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js";
6 |
at processResult (C:\Users\ollie\Documents\Shine\ChromeExtensionScreenCapture\draft\node_modules\webpack\lib\NormalModule.js:758:19)
Capture\draft\node_modules\loader-runner\lib\LoaderRunner.js:400:11 at C:\Users\ollie\Documents\Shine\ChromeExtensionScreenCapture\draft\node_modules\loader-runner\lib\LoaderRunner.js:252:18 at context.callback (C:\Users\ollie\Documents\Shine\ChromeExtensionScreenCapture\draft\node_modules\loader-runner\lib\LoaderRunner.js:124:13) at Object.loader (C:\Users\ollie\Documents\Shine\ChromeExtensionScreenCapture\draft\node_modules\laravel-mix\node_modules\postcss-loader\dist\index.js:140:7)
2 ERRORS in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
webpack compiled with 4 errors
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! yobi-chrome#0.1.0 local: cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --env=local --config=node_modules/laravel-mix/setup/webpack.config.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the yobi-chrome#0.1.0 local script.
npm ERR! C:\Users\ollie\AppData\Roaming\npm-cache_logs\2022-08-30T10_09_41_700Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! yobi-chrome#0.1.0 dev: npm run local
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the yobi-chrome#0.1.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ollie\AppData\Roaming\npm-cache_logs\2022-08-30T10_09_41_718Z-debug.log
webpack.mix.js file
let mix = require('laravel-mix')
let path = require('path')
mix.setPublicPath('./')
mix.alias({
'#': path.join(__dirname, 'src')
});
mix.css('src/assets/css/content_shinego.css', 'dist/assets/css')
.css('src/assets/css/popup_shinego.css', 'dist/assets/css')
.css('src/assets/css/font-awesome.min.css', 'dist/assets/css')
.css('src/assets/css/mdbvue.css', 'dist/assets/css')
mix.js('src/popup/popup.js', 'dist/popup')
.js('src/content_scripts/content.js', 'dist/content_scripts')
.vue();
mix.copy('src/manifest.json', 'dist/')
.copy('src/background.js', 'dist/')
.copy('./css-loader-shim.js', 'dist/')
.copy('src/popup/popup.html', 'dist/popup')
.copy('src/assets/img/', 'dist/assets/img')
.copy('src/assets/icons/', 'dist/assets/icons')
.options({
processCssUrls: false
})
mix.webpackConfig({
module: {
rules: [
{
test: /\_shinego.css$/,
include: path.resolve(__dirname, 'src/assets/css'),
use: [
{
loader: "style-loader",
options: {
injectType: "lazyStyleTag",
insert: function insertIntoTarget(element, options) {
var parent = options.target || document.head;
parent.appendChild(element);
}
},
}
],
}
]
}
});
** Relevant package.json **
"dependencies": {
"#fortawesome/vue-fontawesome": "^2.0.8",
"axios": "^0.27.2",
"bootstrap-vue": "^2.22.0",
"fibers": "^5.0.2",
"fontawesome-free": "^1.0.4",
"lodash": "^4.17.21",
"mdb-vue-ui-kit": "^2.0.0",
"mdbvue": "git+https://oauth2:***#git.mdbootstrap.com/mdb/vue/vu-pro.git",
"postcss-loader": "^7.0.1",
"sass": "^1.54.4",
"vue-shadow-dom": "^4.2.0"
},
"devDependencies": {
"#types/chrome": "^0.0.194",
"#types/webpack-env": "^1.18.0",
"#vue/compiler-sfc": "^3.2.37",
"cross-env": "^7.0.3",
"laravel-mix": "^6.0.49",
"style-loader": "^3.3.1",
"types": "^0.1.1",
"vue": "^3.2.37",
"vue-loader": "^16.8.3",
"vue-template-compiler": "^2.7.9",
"webpack": "^5.74.0"
}

Laravel Spatie Browsershot errno: -4058, code: 'ENOENT'

I am trying to capture a screenshot of my website running in localhost and i am using Spatie/Browsershot.
When i try to run this function
public function receipt(){
$image = Browsershot::url('http://localhost:8000/transaction/receipt/123')
->setNodeBinary('C:\Users\\my_user\\nodejs\\node.exe')
->setNpmBinary('C:\Users\\my_user\\nodejs\\npm.exe')
->base64Screenshot();
return $image;
}
This error popped up
Symfony\Component\Process\Exception\ProcessFailedException
The command "C:^\Users^\Abimanyu^\nodejs^\node.exe ^"D:^\laravel_projects^\teliti-core-app^\vendor^\spatie^\browsershot^\src/../bin/browser.js^" ^"^{^\^"url^\^":^\^"http:^\/^\/localhost:8000^\/transaction^\/receipt^\/123^\^",^\^"action^\^":^\^"screenshot^\^",^\^"options^\^":^{^\^"type^\^":^\^"png^\^",^\^"args^\^":^[^],^\^"viewport^\^":^{^\^"width^\^":800,^\^"height^\^":600^},^\^"executablePath^\^":^\^"C:^\^\Users^\^\Abimanyu^\^\AppData^\^\Local^\^\Google^\^\Chrome^\^\Application^\^\chrome.exe^\^"^}^}^"" failed. Exit Code: 1(General error) Working directory: D:\laravel_projects\teliti-core-app\public Output: ================ Error Output: ================ [Error: ENOENT: no such file or directory, mkdtemp 'undefined\temp\puppeteer_dev_chrome_profile-XXXXXX'] { errno: -4058, code: 'ENOENT', syscall: 'mkdtemp', path: 'undefined\\temp\\puppeteer_dev_chrome_profile-XXXXXX' }
I've tried setting the custom path to these attributes:
setChromePath("C:\Users\my_user\AppData\Local\Google\Chrome\Application\chrome.exe")
setNpmBinary('C:\Users\my_user\AppData\Roaming\npm')
I've also run npm install puppeteer.
Additional :
Laravel 8
Windows 10
Node v14.17.2
Anyone any ideas on what i am doing wrong?

Error while creating pdf from JS Report

I am trying to create pdf with Js report but its giving error,The code I used is
In View:
<h1>Test Application</h1><h1>Test data</h1>
In Controller:
[MiddlewareFilter(typeof(JsReportPipeline))]
public IActionResult CreatePdf()
{
HttpContext.JsReportFeature().Recipe(Recipe.ElectronPdf);
return View("Index1");
}
And In startup.cs
services.AddMvc();
services.AddJsReport(new LocalReporting()
.UseBinary(JsReportBinary.GetBinary())
.AsUtility()
.Create());
and I have installed these three versions jsreport.AspNetCore -Version 1.0.1 and jsreport.Local -Version 1.1.2 and jsreport.Binary -Version 1.10.0
The error is:
An unhandled exception occurred while processing the request.
JsReportBinaryException: Error rendering report: instance has been
daemonized and initialized successfully (pid: 6056)rendering has
finished with errors:Error: An error occurred while trying to execute
the command: at onCriticalError ([eval]:29603:25) at [eval]:29558:13
at tryCatcher ([eval]:36038:23) at Promise._settlePromiseFromHandler
([eval]:34061:31) at Promise._settlePromise ([eval]:34118:18) at
Promise._settlePromise0 ([eval]:34163:10) at Promise._settlePromises
([eval]:34238:18) at Async._drainQueue ([eval]:31008:16) at
Async._drainQueues ([eval]:31018:10) at Immediate.Async.drainQueues
[as _onImmediate] ([eval]:30892:14) at processImmediate [as
_immediateCallback] (timers.js:396:17) {"originalError":{"remoteStack":"Error: Command failed:
C:\Users\swapnil\AppData\Local\Temp\2\jsreport\compile\jsreport-1.10.0-rJLPefJIG\phantomjs.exe
--ignore-ssl-errors=yes --web-security=false --ssl-protocol=any C:\Users\swapnil\AppData\Local\Temp\2\jsreport\compile\jsreport-1.10.0-rJLPefJIG\standaloneScript.js
C:\Users\swapnil\AppData\Local\Temp\2\jsreport\6df52490-68bd-11e8-95df-47fc0392390csettings.html\n\n
at ChildProcess.exithandler (child_process.js:214:12)\n at emitTwo
(events.js:87:13)\n at ChildProcess.emit (events.js:172:7)\n at
maybeClose (internal/child_process.js:854:16)\n at
Process.ChildProcess._handle.onexit
(internal/child_process.js:222:5)"}}(Original) Error: Error during
rendering report: Command failed:
C:\Users\swapnil\AppData\Local\Temp\2\jsreport\compile\jsreport-1.10.0-rJLPefJIG\phantomjs.exe
--ignore-ssl-errors=yes --web-security=false --ssl-protocol=any C:\Users\swapnil\AppData\Local\Temp\2\jsreport\compile\jsreport-1.10.0-rJLPefJIG\standaloneScript.js
C:\Users\swapnil\AppData\Local\Temp\2\jsreport\6df52490-68bd-11e8-95df-47fc0392390csettings.html
at [eval]:36644:23 at ConcatStream. ([eval]:42366:43) at
emitNone (events.js:72:20) at ConcatStream.emit (events.js:166:7) at
finishMaybe ([eval]:4229:14) at afterWrite ([eval]:4115:3) at
nextTickCallbackWithManyArgs (node.js:486:18) at process._tickCallback
(node.js:384:17) {"remoteStack":"Error: Command failed:
C:\Users\Computer\AppData\Local\Temp\2\jsreport\compile\jsreport-1.10.0-rJLPefJIG\phantomjs.exe
--ignore-ssl-errors=yes --web-security=false --ssl-protocol=any C:\Users\Computer\AppData\Local\Temp\2\jsreport\compile\jsreport-1.10.0-rJLPefJIG\standaloneScript.js
C:\Users\Computer\AppData\Local\Temp\2\jsreport\6df52490-68bd-11e8-95df-47fc0392390csettings.html\n\n
at ChildProcess.exithandler (child_process.js:214:12)\n at emitTwo
(events.js:87:13)\n at ChildProcess.emit (events.js:172:7)\n at
maybeClose (internal/child_process.js:854:16)\n at
Process.ChildProcess._handle.onexit
(internal/child_process.js:222:5)"}
I solved this by using
[MiddlewareFilter(typeof(JsReportPipeline))]
public IActionResult CreatePdf()
{
HttpContext.JsReportFeature().Recipe(Recipe.ElectronPdf);
return PartialView("Index1");
}
In 2021 i have updated the jsreport.Binary from (2.9.0) to (2.11.0) and the error was gone.
Thanks

After deploying the approuter to cloud foundry, the app is getting crashed

I followed the steps on this
blog
and deployed the After I deployed the approuter to cloud foundry, the app is getting crashed.
Below is the error log.
2018-04-11T15:26:11.61-0400 [APP/PROC/WEB/0] ERR npm ERR! Linux 4.4.0-111-generic
2018-04-11T15:26:11.61-0400 [APP/PROC/WEB/0] ERR npm ERR! argv “/home/vcap/deps/0/node/bin/node” “/home/vcap/deps/0/bin/npm” “start”
2018-04-11T15:26:11.61-0400 [APP/PROC/WEB/0] ERR npm ERR! node v6.13.1
2018-04-11T15:26:11.61-0400 [APP/PROC/WEB/0] ERR npm ERR! npm v3.10.10
2018-04-11T15:26:11.61-0400 [APP/PROC/WEB/0] ERR npm ERR! path /home/vcap/app/package.json
2018-04-11T15:26:11.61-0400 [APP/PROC/WEB/0] ERR npm ERR! code ENOENT
2018-04-11T15:26:11.61-0400 [APP/PROC/WEB/0] ERR npm ERR! errno -2
2018-04-11T15:26:11.61-0400 [APP/PROC/WEB/0] ERR npm ERR! syscall open
2018-04-11T15:26:11.62-0400 [APP/PROC/WEB/0] ERR npm ERR! enoent ENOENT: no such file or directory, open ‘/home/vcap/app/package.json’
2018-04-11T15:26:11.62-0400 [APP/PROC/WEB/0] ERR npm ERR! enoent ENOENT: no such file or directory, open ‘/home/vcap/app/package.json’
2018-04-11T15:26:11.62-0400 [APP/PROC/WEB/0] ERR npm ERR! enoent This is most likely not a problem with npm itself
2018-04-11T15:26:11.62-0400 [APP/PROC/WEB/0] ERR npm ERR! enoent and is related to npm not being able to find a file.
2018-04-11T15:26:11.62-0400 [APP/PROC/WEB/0] ERR npm ERR! enoent
2018-04-11T15:26:11.62-0400 [APP/PROC/WEB/0] ERR npm ERR! Please include the following file with any support request:
2018-04-11T15:26:11.62-0400 [APP/PROC/WEB/0] ERR npm ERR! /home/vcap/app/npm-debug.log
The error log says package.json file is missing, but i placed package.json file inside the approuter directory.
Below is the code in manifest.json file.
---
applications:
- name: approuter
host: approuter-s0018349215trial
path: approuter
memory: 128M
buildpack: nodejs_buildpack
env:
TENANT_HOST_PATTERN: '*****'
destinations: '[{"name":"Businesspartners_cloudfoundry", "url"
:"https://***********", "forwardAuthToken": true}]'
services:
- my-xsuaa
Below is the package.json file
{
"name": "#sap/approuter",
"description": "Node.js based application router",
"version": "2.10.0",
"repository": {},
"main": "approuter.js",
"dependencies": {
"agentkeepalive": "2.0.5",
"async": "2.0.1",
"basic-auth": "1.0.3",
"commander": "2.9.0",
"compression": "1.6.0",
"connect": "3.6.2",
"cookie": "0.2.2",
"cookie-parser": "1.3.5",
"cookie-signature": "1.0.6",
"express-session": "1.15.3",
"http-proxy-agent": "1.0.0",
"https-proxy-agent": "1.0.0",
"jwt-decode": "2.0.1",
"lodash": "4.17.4",
"lru-cache": "4.0.0",
"mustache": "2.2.1",
"passport": "0.3.2",
"request": "2.81.0",
"request-stats": "2.0.1",
"safe-regex": "1.1.0",
"#sap/audit-logging": "^1.0.5",
"#sap/e2e-trace": "^1.1.2",
"#sap/logging": "^3.0.0",
"#sap/xsenv": "^1.2.6",
"send": "0.15.3",
"serve-static": "1.12.3",
"tough-cookie": "2.3.1",
"tv4": "1.2.7",
"urijs": "1.16.1",
"verror": "1.10.0",
"ws": "1.1.4",
"base64-url": "1.2.1",
"scmp": "1.0.0",
"uid-safe": "~2.0.0"
},
"devDependencies": {
"body-parser": "1.15.2",
"chai": "3.5.0",
"diveSync": "0.3.0",
"eslint": "3.2.2",
"filter-node-package": "^2.0.0",
"istanbul": "0.4.4",
"markdown-toc": "^1.1.0",
"mocha": "3.0.2",
"node-build": "^1.0.0",
"node-mocks-http": "1.5.2",
"node-style": "^2.0.0",
"proxyquire": "1.7.10",
"rimraf": "2.5.4",
"sinon": "1.17.5",
"supertest": "2.0.0"
},
"engines": {
"node": "^0.12.7 || ^4.4.0 || ^6.0.0"
},
"files": [
"lib",
"doc",
"package.json",
"README.md",
"approuter.js"
],
"scripts": {
"start": "node approuter.js",
"test": "node build/test",
"lint": "eslint -c node_modules/node-style/.eslintrc -f stylish lib/ approuter.js",
"toc": "markdown-toc -i README.md && markdown-toc -i doc/extending.md && markdown-toc -i doc/sizingGuide.md",
"prepareRelease": "node build/delete-extra-packages.js && clean-packages && npm prune --production"
}
}
Below is the screenshot of working directory.
Below is the screenshot of approuter directory
A different error is coming up on deploying cf push command with below error log.
2018-04-23T09:27:34.02-0400 [APP/PROC/WEB/0] ERR /home/vcap/app/lib/utils/JsonValidator.js:30
2018-04-23T09:27:34.02-0400 [APP/PROC/WEB/0] ERR throw new
VError('%s%s: %s', 2018-04-23T09:27:34.02-0400 [APP/PROC/WEB/0] ERR
^ 2018-04-23T09:27:34.02-0400 [APP/PROC/WEB/0] ERR VError:
environment-settings/tenantHostPattern: Format validation failed
(regular expression must contain a capturing group)
2018-04-23T09:27:34.02-0400 [APP/PROC/WEB/0] ERR at
JsonValidator.validate
(/home/vcap/app/lib/utils/JsonValidator.js:30:11)
2018-04-23T09:27:34.02-0400 [APP/PROC/WEB/0] ERR at
Object.validateEnvironmentSettings
(/home/vcap/app/lib/configuration/validators.js:106:15)
2018-04-23T09:27:34.02-0400 [APP/PROC/WEB/0] ERR at
loadGroupedConfigurations
(/home/vcap/app/lib/configuration/env-config.js:146:14)
2018-04-23T09:27:34.02-0400 [APP/PROC/WEB/0] ERR at Object.load
(/home/vcap/app/lib/configuration/env-config.js:28:17)
2018-04-23T09:27:34.02-0400 [APP/PROC/WEB/0] ERR at
Object.module.exports.load (/home/vcap/app/lib/configuration.js:15:37)
2018-04-23T09:27:34.02-0400 [APP/PROC/WEB/0] ERR at bootstrap
(/home/vcap/app/lib/bootstrap.js:47:36) 2018-04-23T09:27:34.02-0400
[APP/PROC/WEB/0] ERR at Approuter.start
(/home/vcap/app/approuter.js:58:13) 2018-04-23T09:27:34.02-0400
[APP/PROC/WEB/0] ERR at Object.
(/home/vcap/app/approuter.js:115:6) 2018-04-23T09:27:34.02-0400
[APP/PROC/WEB/0] ERR at Module._compile (module.js:577:32)
2018-04-23T09:27:34.02-0400 [APP/PROC/WEB/0] ERR at
Object.Module._extensions..js (module.js:586:10)
2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR! Linux
4.4.0-116-generic 2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR! argv "/home/vcap/deps/0/node/bin/node"
"/home/vcap/deps/0/bin/npm" "start" 2018-04-23T09:27:34.04-0400
[APP/PROC/WEB/0] ERR npm ERR! node v6.13.1
2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR! npm
v3.10.10 2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR!
code ELIFECYCLE 2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR
npm ERR! #sap/approuter#2.10.0 start: node approuter.js
2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR! Exit status
1 2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR!
2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR! Failed at
the #sap/approuter#2.10.0 start script 'node approuter.js'.
2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR! Make sure
you have the latest version of node.js and npm installed.
2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR! If you do,
this is most likely a problem with the #sap/approuter package,
2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR! not with npm
itself. 2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR!
Tell the author that this fails on your system:
2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR! node
approuter.js 2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm
ERR! You can get information on how to open an issue for this project
with: 2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR!
npm bugs #sap/approuter 2018-04-23T09:27:34.04-0400
[APP/PROC/WEB/0] ERR npm ERR! Or if that isn't available, you can get
their info via: 2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR
npm ERR! npm owner ls #sap/approuter
2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR! There is
likely additional logging output above. 2018-04-23T09:27:34.05-0400
[APP/PROC/WEB/0] ERR npm ERR! Please include the following file with
any support request: 2018-04-23T09:27:34.05-0400 [APP/PROC/WEB/0]
ERR npm ERR! /home/vcap/app/npm-debug.log
Below is the output on executing the cf push command.
Uploading approuter... Uploading app files from:
C:\Users\sanke\Desktop\favLocation\approuter Uploading 3.3M, 4197
files Done uploading OK Binding service my-xsuaa to app approuter in
org P1942820265trial_trial / space dev as
sankeerthnarsina#gmail.com... OK
Starting app approuter in org P1942820265trial_trial / space dev as
sankeerthnarsina#gmail.com... Downloading nodejs_buildpack... Cell
09aeff0a-17aa-40ac-aee3-dcf077acd6c9 successfully created container
for instance 6485e7e3-0b40-4db3-8880-dba968c55583 Downloaded
nodejs_buildpack Cell 09aeff0a-17aa-40ac-aee3-dcf077acd6c9 creating
container for instance 6485e7e3-0b40-4db3-8880-dba968c55583
Downloading app package... Downloaded app package (4.5M)
-----> Nodejs Buildpack version 1.6.20
-----> Installing binaries
engines.node (package.json): ^0.12.7 || ^4.4.0 || ^6.0.0
engines.npm (package.json): unspecified (use default)
-----> Installing node 6.13.1
Download [https://buildpacks.cloudfoundry.org/dependencies/node/node-6.13.1-linux-x64-fc51b8dd.tgz]
Using default npm version: 3.10.10
-----> Installing yarn 1.5.1
Download [https://buildpacks.cloudfoundry.org/dependencies/yarn/yarn-v1.5.1-cd316572.tar.gz]
Installed yarn 1.5.1
-----> Creating runtime environment
NODE_ENV=production
NODE_HOME=/tmp/contents135652367/deps/0/node
NODE_MODULES_CACHE=true
NODE_VERBOSE=false
NPM_CONFIG_LOGLEVEL=error
NPM_CONFIG_PRODUCTION=true
-----> Restoring cache
Skipping cache restore (no previous cache)
-----> Building dependencies
Prebuild detected (node_modules already exists)
Rebuilding any native modules agentkeepalive#2.0.5 /tmp/app/node_modules/agentkeepalive async#2.0.1
/tmp/app/node_modules/async lodash#4.17.4 /tmp/app/node_modules/lodash
basic-auth#1.0.3 /tmp/app/node_modules/basic-auth commander#2.9.0
/tmp/app/node_modules/commander graceful-readlink#1.0.1
/tmp/app/node_modules/graceful-readlink compression#1.6.0
/tmp/app/node_modules/compression accepts#1.3.3
/tmp/app/node_modules/accepts negotiator#0.6.1
/tmp/app/node_modules/negotiator mime-types#2.1.16
/tmp/app/node_modules/mime-types mime-db#1.29.0
/tmp/app/node_modules/mime-db compressible#2.0.11
/tmp/app/node_modules/compressible vary#1.1.1
/tmp/app/node_modules/vary bytes#2.1.0 /tmp/app/node_modules/bytes
on-headers#1.0.1 /tmp/app/node_modules/on-headers debug#2.2.0
/tmp/app/node_modules/compression/node_modules/debug ms#0.7.1
/tmp/app/node_modules/compression/node_modules/ms connect#3.6.2
/tmp/app/node_modules/connect debug#2.6.7 /tmp/app/node_modules/debug
ms#2.0.0 /tmp/app/node_modules/ms finalhandler#1.0.3
/tmp/app/node_modules/finalhandler parseurl#1.3.1
/tmp/app/node_modules/parseurl escape-html#1.0.3
/tmp/app/node_modules/escape-html encodeurl#1.0.1
/tmp/app/node_modules/encodeurl unpipe#1.0.0
/tmp/app/node_modules/unpipe on-finished#2.3.0
/tmp/app/node_modules/on-finished ee-first#1.1.1
/tmp/app/node_modules/ee-first statuses#1.3.1
/tmp/app/node_modules/statuses utils-merge#1.0.0
/tmp/app/node_modules/utils-merge cookie#0.2.2
/tmp/app/node_modules/cookie cookie-parser#1.3.5
/tmp/app/node_modules/cookie-parser cookie-signature#1.0.6
/tmp/app/node_modules/cookie-signature cookie#0.1.3
/tmp/app/node_modules/cookie-parser/node_modules/cookie
express-session#1.15.3 /tmp/app/node_modules/express-session
depd#1.1.1 /tmp/app/node_modules/depd uid-safe#2.1.4
/tmp/app/node_modules/express-session/node_modules/uid-safe
random-bytes#1.0.0 /tmp/app/node_modules/random-bytes crc#3.4.4
/tmp/app/node_modules/crc cookie#0.3.1
/tmp/app/node_modules/express-session/node_modules/cookie
http-proxy-agent#1.0.0 /tmp/app/node_modules/http-proxy-agent
agent-base#2.1.1 /tmp/app/node_modules/agent-base semver#5.0.3
/tmp/app/node_modules/semver extend#3.0.1 /tmp/app/node_modules/extend
https-proxy-agent#1.0.0 /tmp/app/node_modules/https-proxy-agent
jwt-decode#2.0.1 /tmp/app/node_modules/jwt-decode lru-cache#4.0.0
/tmp/app/node_modules/lru-cache pseudomap#1.0.2
/tmp/app/node_modules/pseudomap yallist#2.1.2
/tmp/app/node_modules/yallist mustache#2.2.1
/tmp/app/node_modules/mustache passport#0.3.2
/tmp/app/node_modules/passport pause#0.0.1 /tmp/app/node_modules/pause
passport-strategy#1.0.0 /tmp/app/node_modules/passport-strategy
request#2.81.0 /tmp/app/node_modules/request performance-now#0.2.0
/tmp/app/node_modules/performance-now stringstream#0.0.5
/tmp/app/node_modules/stringstream aws4#1.6.0
/tmp/app/node_modules/aws4 uuid#3.1.0 /tmp/app/node_modules/uuid
tunnel-agent#0.6.0 /tmp/app/node_modules/tunnel-agent
safe-buffer#5.1.1 /tmp/app/node_modules/safe-buffer tough-cookie#2.3.1
/tmp/app/node_modules/tough-cookie is-typedarray#1.0.0
/tmp/app/node_modules/is-typedarray http-signature#1.1.1
/tmp/app/node_modules/http-signature sshpk#1.13.1
/tmp/app/node_modules/sshpk asn1#0.2.3 /tmp/app/node_modules/asn1
getpass#0.1.7 /tmp/app/node_modules/getpass assert-plus#1.0.0
/tmp/app/node_modules/assert-plus dashdash#1.14.1
/tmp/app/node_modules/dashdash assert-plus#0.2.0
/tmp/app/node_modules/http-signature/node_modules/assert-plus
jsprim#1.4.0 /tmp/app/node_modules/jsprim json-schema#0.2.3
/tmp/app/node_modules/json-schema verror#1.3.6
/tmp/app/node_modules/jsprim/node_modules/verror extsprintf#1.0.2
/tmp/app/node_modules/jsprim/node_modules/extsprintf
har-validator#4.2.1 /tmp/app/node_modules/har-validator
har-schema#1.0.5 /tmp/app/node_modules/har-schema ajv#4.11.8
/tmp/app/node_modules/ajv co#4.6.0 /tmp/app/node_modules/co
json-stable-stringify#1.0.1
/tmp/app/node_modules/json-stable-stringify jsonify#0.0.0
/tmp/app/node_modules/jsonify aws-sign2#0.6.0
/tmp/app/node_modules/aws-sign2 hawk#3.1.3 /tmp/app/node_modules/hawk
sntp#1.0.9 /tmp/app/node_modules/sntp hoek#2.16.3
/tmp/app/node_modules/hoek boom#2.10.1 /tmp/app/node_modules/boom
cryptiles#2.0.5 /tmp/app/node_modules/cryptiles qs#6.4.0
/tmp/app/node_modules/qs json-stringify-safe#5.0.1
/tmp/app/node_modules/json-stringify-safe caseless#0.12.0
/tmp/app/node_modules/caseless isstream#0.1.2
/tmp/app/node_modules/isstream form-data#2.1.4
/tmp/app/node_modules/form-data asynckit#0.4.0
/tmp/app/node_modules/asynckit combined-stream#1.0.5
/tmp/app/node_modules/combined-stream delayed-stream#1.0.0
/tmp/app/node_modules/delayed-stream oauth-sign#0.8.2
/tmp/app/node_modules/oauth-sign forever-agent#0.6.1
/tmp/app/node_modules/forever-agent request-stats#2.0.1
/tmp/app/node_modules/request-stats http-headers#3.0.1
/tmp/app/node_modules/http-headers next-line#1.1.0
/tmp/app/node_modules/next-line once#1.4.0 /tmp/app/node_modules/once
wrappy#1.0.2 /tmp/app/node_modules/wrappy safe-regex#1.1.0
/tmp/app/node_modules/safe-regex ret#0.1.14 /tmp/app/node_modules/ret
#sap/audit-logging#1.0.5 /tmp/app/node_modules/#sap/audit-logging
moment#2.15.2 /tmp/app/node_modules/moment winston#1.1.2
/tmp/app/node_modules/winston eyes#0.1.8 /tmp/app/node_modules/eyes
pkginfo#0.3.1 /tmp/app/node_modules/pkginfo colors#1.0.3
/tmp/app/node_modules/colors async#1.0.0
/tmp/app/node_modules/winston/node_modules/async stack-trace#0.0.10
/tmp/app/node_modules/stack-trace cycle#1.0.3
/tmp/app/node_modules/cycle #sap/e2e-trace#1.1.3
/tmp/app/node_modules/#sap/e2e-trace #sap/logging#3.0.0
/tmp/app/node_modules/#sap/logging lodash#4.13.1
/tmp/app/node_modules/#sap/logging/node_modules/lodash
#sap/xsenv#1.2.7 /tmp/app/node_modules/#sap/xsenv verror#1.10.0
/tmp/app/node_modules/verror core-util-is#1.0.2
/tmp/app/node_modules/core-util-is extsprintf#1.3.0
/tmp/app/node_modules/extsprintf send#0.15.3
/tmp/app/node_modules/send range-parser#1.2.0
/tmp/app/node_modules/range-parser http-errors#1.6.1
/tmp/app/node_modules/http-errors inherits#2.0.3
/tmp/app/node_modules/inherits depd#1.1.0
/tmp/app/node_modules/http-errors/node_modules/depd
setprototypeof#1.0.3 /tmp/app/node_modules/setprototypeof etag#1.8.0
/tmp/app/node_modules/etag mime#1.3.4 /tmp/app/node_modules/mime
fresh#0.5.0 /tmp/app/node_modules/fresh destroy#1.0.4
/tmp/app/node_modules/destroy serve-static#1.12.3
/tmp/app/node_modules/serve-static tv4#1.2.7 /tmp/app/node_modules/tv4
urijs#1.16.1 /tmp/app/node_modules/urijs ws#1.1.4
/tmp/app/node_modules/ws ultron#1.0.2 /tmp/app/node_modules/ultron
options#0.0.6 /tmp/app/node_modules/options base64-url#1.2.1
/tmp/app/node_modules/base64-url scmp#1.0.0 /tmp/app/node_modules/scmp
uid-safe#2.0.0 /tmp/app/node_modules/uid-safe bcrypt-pbkdf#1.0.1
/tmp/app/node_modules/bcrypt-pbkdf tweetnacl#0.14.5
/tmp/app/node_modules/tweetnacl ecc-jsbn#0.1.1
/tmp/app/node_modules/ecc-jsbn jsbn#0.1.1 /tmp/app/node_modules/jsbn
Installing any new modules (package.json)
-----> Caching build
Clearing previous node cache
Saving 3 cacheDirectories (default):
- .npm (nothing to cache)
- .cache/yarn (nothing to cache)
- bower_components (nothing to cache) Exit status 0 Uploading droplet, build artifacts cache... Uploading build artifacts cache...
Uploading droplet... Uploaded build artifacts cache (14.3M) Uploaded
droplet (17.6M) Uploading complete Cell
09aeff0a-17aa-40ac-aee3-dcf077acd6c9 stopping instance
6485e7e3-0b40-4db3-8880-dba968c55583 Cell
09aeff0a-17aa-40ac-aee3-dcf077acd6c9 destroying container for instance
6485e7e3-0b40-4db3-8880-dba968c55583 Cell
09aeff0a-17aa-40ac-aee3-dcf077acd6c9 successfully destroyed container
for instance 6485e7e3-0b40-4db3-8880-dba968c55583
0 of 1 instances running, 1 starting 0 of 1 instances running, 1
crashed FAILED Error restarting application: Start unsuccessful
Can someone please help me?
The log message indicates that the the environment variable for the TENANT_HOST_PATTERN variable cannot be correctly parsed: ERR VError: environment-settings/tenantHostPattern: Format validation failed (regular expression must contain a capturing group).
Please specify a correct regular expression for the TENANT_HOST_PATTERN variable in manifest.yml such as approuter-(.*).cfapps.eu10.hana.ondemand.com (please note to replace the domain with the landscape that you are deploying to).
Alternatively, you may set the variable via cf set-env approuter TENANT_HOST_PATTERN 'approuter-(.*).cfapps.eu10.hana.ondemand.com' followed by a cf restage approuter command.

Angular 2 Protractor cannot require .scss files

I'm trying to run a Protractor Test using Angular 2 and Webpack
Partial Webpack config:
resolve: {
extensions: ['', '.ts', '.js', '.scss', '.css']
},
module: {
loaders: [
// TypeScript
{ test: /\.ts$/, loader: 'ts-loader'},
// SCSS
{ test: /\.scss$/, exclude: /node_modules/, loaders: ['raw-loader', 'sass-loader']}
]
},
plugins: [
new webpack.optimize.OccurenceOrderPlugin(true)
]
My home.component.ts
import { Component, Injectable } from '#angular/core';
#Component({
selector: 'home',
styles: [require('./home.component.scss')],
template: `<h4 class="page-home">Home</h4>`
})
#Injectable()
export class Home {}
And my home.component.scss
.page-home {
color: blue;
}
And my E2E:
require('../server');
describe('App', () => {
beforeEach(() => {
browser.get('/');
});
it('should have a title', (done) => {
let subject = browser.getTitle();
subject
.then((data) => {
let result = 'test';
expect(data).toEqual(result);
done();
});
});
it('should definitely pass', () => {
expect(true).toEqual(true);
});
});
I run the server and everything comes up as expected. When I run my E2E tests I get the following error:
[14:42:47] I/hosted - Using the selenium server at http://hub.browserstack.com/wd/hub
[14:42:47] I/launcher - Running 1 instances of WebDriver
[14:43:03] E/launcher - Error: /app/src/app/home/home.component.scss:1
(function (exports, require, module, __filename, __dirname) { .page-home {
^
SyntaxError: Unexpected token .
at Object.exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:513:28)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at home.component.ts:5:12
at Object.<anonymous> (home.component.ts:9:21)
[14:43:03] E/launcher - Process exited with error code 100
npm info lifecycle cnd-app#1.0.0~protractor: Failed to exec protractor script
npm ERR! Linux 3.19.0-59-generic
npm ERR! argv "/usr/local/bin/node" "/app/node_modules/.bin/npm" "run" "protractor"
npm ERR! node v6.2.0
npm ERR! npm v3.9.2
npm ERR! code ELIFECYCLE
npm ERR! cnd-app#1.0.0 protractor: `protractor protractor.conf.js`
npm ERR! Exit status 100
It seems like protractor uses require different than how WebPack treats it.Is there a config for this or anything I am missing?
** Update **
I am able to resolve the issue. I have a typescript register causing conflict in the protractor.conf.js.

Resources