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

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.

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"
}

Discord Bot and Heroku

Hi I need some help with my discord bot. I searched up the errors and tried to fix it, but it just doesn’t work. It could have been a coding error on my end. PLEASE HELP and Thanks!
Link for the GitHub repository:
https://github.com/Verggz/Electrolite
Edit: errors that keep occuring
Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
2022-01-23T15:14:15.475287+00:00 app[worker.1]: (Use `node --trace-warnings ...` to show where the warning was created)
2022-01-23T15:14:15.476783+00:00 app[worker.1]: /app/main.ts:1
2022-01-23T15:14:15.476784+00:00 app[worker.1]: import express from 'express';
2022-01-23T15:14:15.476785+00:00 app[worker.1]: ^^^^^^
2022-01-23T15:14:15.476785+00:00 app[worker.1]:
2022-01-23T15:14:15.476785+00:00 app[worker.1]: SyntaxError: Cannot use import statement outside a module
2022-01-23T15:14:15.476786+00:00 app[worker.1]: at wrapSafe (internal/modules/cjs/loader.js:1001:16)
2022-01-23T15:14:15.476786+00:00 app[worker.1]: at Module._compile (internal/modules/cjs/loader.js:1049:27)
2022-01-23T15:14:15.476786+00:00 app[worker.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
2022-01-23T15:14:15.476787+00:00 app[worker.1]: at Module.load (internal/modules/cjs/loader.js:950:32)
2022-01-23T15:14:15.476787+00:00 app[worker.1]: at Function.Module._load (internal/modules/cjs/loader.js:790:12)
2022-01-23T15:14:15.476787+00:00 app[worker.1]: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
2022-01-23T15:14:15.476788+00:00 app[worker.1]: at internal/main/run_main_module.js:17:47
package.json:
{
"name": "electrolite",
"version": "0.0.1",
"description": "literally just project scyll v2 but better",
"main": "./build/main.js",
"scripts": {
"start": "node --max-old-space-size=512 ./build/main.js && export NODE_ENV=production",
"dev": "tsc && node ./build/main.js",
"bot": "node ./build/bot/main.bot.js",
"botdev": "tsc && node ./build/bot/main.bot.js"
},
"keywords": [
"minecraft"
],
"author": "PenguinDetox",
"license": "ISC",
"dependencies": {
"#discordjs/builders": "^0.11.0",
"#discordjs/rest": "^0.2.0-canary.0",
"axios": "^0.24.0",
"discord-api-types": "^0.26.1",
"discord.js": "^13.5.0",
"express": "^4.17.2",
"fs-extra": "^10.0.0",
"hypixel-api-reborn": "^9.0.3",
"prismarine-nbt": "^2.0.0",
"set-interval-async": "^2.0.3"
},
"devDependencies": {
"#types/express": "^4.17.13",
"#types/fs-extra": "^9.0.13",
"#types/node": "^17.0.4",
"#types/set-interval-async": "^1.0.0"
}
}
Procfile:
worker: node main.ts
I'm not totally sure what you're trying to do here, but the main issue at the moment is that you're asking Heroku to run your TypeScript code, not the compiled JavaScript. This is being done via your Procfile:
worker: node main.ts
You have a completely different command in your package.json:
"start": "node --max-old-space-size=512 ./build/main.js && export NODE_ENV=production",
This is probably closer to what you want, but we can't just use it like this.
The && export NODE_ENV part is unlikely to do anything useful: it will wait until your code stops running, then export an environment variable, then exit. Let's remove it:
"start": "node --max-old-space-size=512 ./build/main.js",
Now the issue is that build/main.js doesn't exist. You need to tell Heroku to build it during deployment. Based on your dev script, I believe that just involves running tsc.
Let's add a build script to do that:
"build": "tsc",
"start": "node --max-old-space-size=512 ./build/main.js",
(I don't see typescript in your devDependencies, which means tsc might fail to run. Make sure to include all dependencies in your package.json.)
Okay, so your build script will now tell Heroku to build your application during deployment and your build/main.js should exist. Your start script has been updated.
Let's deal with your Procfile. Update it to match the new start script:
worker: node --max-old-space-size=512 ./build/main.js
Commit all those changes and redeploy.

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?

Cannot run semantic-release-cli setup for GitHub action

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.

How to download csv filw with Maatwebsite\Excel in axios request?

In laravel 5.8 / axios "^0.18", "vue": "^2.5.17" app I use Maatwebsite\Excel to upload csv file
It works in case I run laravel control in GET request,
but I use axios for post requests and running request the file is not downloaded at all.
I run my request in JS code :
axios({
method: ( 'post' ),
url: this.$store.getters.apiUrl + '/personal/run-user-list-export-to-csv',
data: { user_id : user_id, user_list_id: user_list_id },
}).then((response) => {
this.showPopupMessage("User list export", "User list successfully exported !", 'success');
}).catch((error) => {
this.showPopupMessage("User list export", 'Error exporting user\'s list !', 'error');
});
with control :
public function run_user_list_export_to_csv() // http://127.0.0.1:8000/api/run-user-list-export-to-csv
{
$request= request();
...
$ret= \Excel::download(new exportSearchResults($user_list_id), 'file.csv'); // if write RETURN this line file is not downloaded anyway...
return response()->json( ['error_code' => 1, 'message' => '', 'ret' => $ret, HTTP_RESPONSE_INTERNAL_SERVER_ERROR ] );
} // public function storerun_user_list_export_to_csv(UserLisRequest $request)
I browser's responce I see output :
{"error_code":1,"message":"","ret":{"headers":{}},"0":500}
But file is not downloaded. How correctly?
Modified :
I tried to remake with sending headers in my control action, like :
public function run_user_list_export_to_csv()
{
$request= request();
...
$filename= $title.'.csv';
$download_path= $filename;
$ret= \Excel::download(new exportSearchResults($user_list_id), $download_path);
\Log::info($ret);
$headers = ['Content-Type: application/csv','Content-Disposition: attachment; filename={$filename}'];
return response($download_path, 200,$headers);
} // public function storerun_user_list_export_to_csv(UserLisRequest $request)
I see in log file output :
[2019-06-14 04:46:23] local.INFO: HTTP/1.0 200 OK
Cache-Control: public
Content-Disposition: attachment; filename="aaa Z3 iuy65 .csv"
Date: Fri, 14 Jun 2019 04:46:23 GMT
Last-Modified: Fri, 14 Jun 2019 04:46:23 GMT
But no file is downloaded.
Which is the right way ?
Modified 2 :
1) I generate csv file but failed to download it in browser's download method. This way seemed preferable to me.
But I can move generated csv file to some directory(say /home/user/ ) and to open it in client's csv app.
2) How can I with vue js to define name of current user and his download directory (bearing in mind that clients can have different OS)
Modified 3 :
I found this https://github.com/ynishi/vuecsv plugin and tried to install it.
$ npm install ynishi/vuecsv
> core-js#2.6.9 postinstall /mnt/_work_sdb8/wwwroot/lar/wiznext/msg-laravel-application/node_modules/core-js
> node scripts/postinstall || echo "ignore"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
> bootstrap-vue#1.5.1 postinstall /mnt/_work_sdb8/wwwroot/lar/wiznext/msg-laravel-application/node_modules/bootstrap-vue
> opencollective postinstall || exit 0
Thanks for installing bootstrap-vue
Please consider donating to our open collective
to help us maintain this package.
Number of contributors: 227
Number of backers: 31
Annual budget: $774
Current balance: $1,190
Donate: https://opencollective.com/bootstrap-vue/donate
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ vuecsv#0.0.10
added 44 packages from 32 contributors and audited 17038 packages in 87.476s
found 1 high severity vulnerability
run `npm audit fix` to fix them, or `npm audit` for details
The output above was somewhat unuaual, but was it just advirtisement.
Next I run :
npm audit fix
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
up to date in 8.632s
fixed 0 of 1 vulnerability in 17038 scanned packages
1 vulnerability required manual review and could not be updated
After that package.json :
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"axios": "^0.18",
"bootstrap": "^4.0.0",
"cross-env": "^5.1",
"jquery": "^3.4.1",
"laravel-mix": "^4.0.7",
"lodash": "^4.17.5",
"popper.js": "^1.12",
"resolve-url-loader": "^2.3.1",
"sass": "^1.15.2",
"sass-loader": "^7.1.0",
"vue": "^2.5.17",
"vue-template-compiler": "^2.6.10"
},
"dependencies": {
"cors": "^2.8.5",
"remove": "^0.1.5",
"v-tooltip": "^2.0.2",
"vee-validate": "^2.2.5",
"vee-validate-laravel": "^1.1.0",
"vue-js-modal": "^1.3.31",
"vue-moment": "^4.0.0",
"vue-notification": "^1.3.16",
"vue-router": "^3.0.6",
"vue-select": "^3.1.0",
"vue-slider-component": "^3.0.31",
"vue2-filters": "^0.6.0",
"vuecsv": "github:ynishi/vuecsv",
"vuejs-paginate": "^2.1.0",
"vuex": "^3.1.0"
}
}
I tried to use this https://jsfiddle.net/ynishif/1ztu8x8q/ fiddle,
But I Got error referenced at my file :
app.js?dt=1560770053:2823 Uncaught ReferenceError: VueCSV is not defined
at Module../node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/Horizontal/personal/userLists/list.vue?
in /Horizontal/personal/userLists/list.vue:
<script>
...
import Vue from 'vue';
Vue.component("csv-download", VueCSV.CsvDownload)
I am very confused as VueCSV is not defined anywhere, but it works if mentioned fiddle.
What did I miss?
Modified 4 :
I tried to import vuecsv in my *.vue file and after installing of vuecsv.min.js I have
/node_modules/vuecsv/dist/vuecsv.min.js file
and in my vue file I tried to make like :
<script>
import {bus} from '../../../../app';
import appMixin from '../../../../appMixin';
//import
import VueCSV from '/vuecsv/dist/vuecsv.min.js'; // /node_modules/vuecsv/dist/vuecsv.min.js
Vue.use(VueCSV);
Vue.component("csv-download" , VueCSV.CsvDownload )
but in console I see error :
ERROR in ./resources/js/components/Horizontal/personal/userLists/list.vue?vue&type=script&lang=js& (./node_modules/babel-loader/lib??ref--4-0!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/Horizontal/personal/userLists/list.vue?vue&type=script&lang=js&)
Module not found: Error: Can't resolve '/vuecsv/dist/vuecsv.min.js' in '/mnt/_work_sdb8/wwwroot/lar/wiznext/msg-laravel-application/resources/js/components/Horizontal/personal/userLists'
# ./resources/js/components/Horizontal/personal/userLists/list.vue?vue&type=script&lang=js& (./node_modules/babel-loader/lib??ref--4-0!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/Horizontal/personal/userLists/list.vue?vue&type=script&lang=js&) 124:0-48 127:8-14 132:30-36
# ./resources/js/components/Horizontal/personal/userLists/list.vue?vue&type=script&lang=js&
# ./resources/js/components/Horizontal/personal/userLists/list.vue
# ./resources/js/routes.js
# ./resources/js/app.js
# multi ./resources/js/app.js ./resources/sass/Horizontal/app.scss ./resources/sass/Horizontal/style_lg.scss ./resources/sass/Horizontal/style_md.scss ./resources/sass/Horizontal/style_sm.scss ./resources/sass/Horizontal/style_xs_320.scss ./resources/sass/Horizontal/style_xs_480.scss ./resources/sass/Horizontal/style_xs_600.scss
If i modify import line as :
import VueCSV from 'vuecsv'; // /node_modules/vuecsv/dist/vuecsv.min.js
I see error in npm console :
This dependency was not found:
* Vue in ./node_modules/vuecsv/dist/vuecsv.min.js
To install it, you can run: npm install --save Vue
sure I have vue installed.
Which way is right?
Can it be that this plugin is not working at? Can you propose similar ?
To upload file with axios :
const config = {
headers: {
"content-type": "multipart/form-data",
"Access-Control-Allow-Origin": "*"
}
};
axios.post(ROOT+'/image/upload',data,config);
Your laravel route :
Route::post('/image/upload','API\ImageController#upload');
Your ImageController :
public function upload(Request $request)
{
$file = $request->file('image');

Resources