Giter Club home page Giter Club logo

okrsw's People

Watchers

 avatar

okrsw's Issues

Failed to resolve async component default: TypeError: Cannot read property 'call' of undefined

vue-router] Failed to resolve async component default: TypeError: Cannot read property 'call' of undefined
warn @ app.js:sourcemap:43120
(anonymous) @ app.js:sourcemap:44883
(anonymous) @ app.js:sourcemap:44953
Promise rejected (async)
(anonymous) @ app.js:sourcemap:44900
(anonymous) @ app.js:sourcemap:44921
(anonymous) @ app.js:sourcemap:44921
flatMapComponents @ app.js:sourcemap:44920
(anonymous) @ app.js:sourcemap:44856
iterator @ app.js:sourcemap:45063
step @ app.js:sourcemap:44837
step @ app.js:sourcemap:44841
runQueue @ app.js:sourcemap:44845
confirmTransition @ app.js:sourcemap:45092
transitionTo @ app.js:sourcemap:44994
init @ app.js:sourcemap:45645
beforeCreate @ app.js:sourcemap:43657
invokeWithErrorHandling @ app.js:sourcemap:47646
callHook @ app.js:sourcemap:49997
Vue._init @ app.js:sourcemap:50775
Vue @ app.js:sourcemap:50855
./resources/js/app.js @ app.js:sourcemap:58986
webpack_require @ app.js:sourcemap:64
0 @ app.js:sourcemap:59278
webpack_require @ app.js:sourcemap:64
(anonymous) @ app.js:sourcemap:196
(anonymous) @ app.js:sourcemap:199
app.js:sourcemap:43120 [vue-router] uncaught error during route navigation:

为什么 php empty() 没有值

    $annualObject = $this->repository->findWhere([
		'id' => $id
	]); 当$annualObject为空的时候。
   empty($annualObject)的值,不是true / false 而是空?

var_dump(empty($annualObject))输出值为: bool(false)

isset($annualObject) 为 1, 已经被定义。
gettype($annualObject) 为 Object。

Laravel Job:Type error: Too few arguments to function App\Jobs\AnalyseActivitiesQuality::__construct()

Type error: Too few arguments to function App\Jobs\AnalyseActivitiesQuality::__construct()

[2018-09-14 16:38:14] local.ERROR: Type error: Too few arguments to function App\Jobs\AnalyseActivitiesQuality::__construct(), 0 passed in D:\laragon\www\OKRsWalking\app\Console\Kernel.php on line 30 and exactly 3 expected {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Type error: Too few arguments to function App\Jobs\AnalyseActivitiesQuality::__construct(), 0 passed in D:\laragon\www\OKRsWalking\app\Console\Kernel.php on line 30 and exactly 3 expected at D:\laragon\www\OKRsWalking\app\Jobs\AnalyseActivitiesQuality.php:43)
[stacktrace]

Method Illuminate\Auth\RequestGuard::attempt does not exist.

[2019-06-28 06:33:28] local.ERROR: Method Illuminate\Auth\RequestGuard::attempt does not exist. {"exception":"[object] (BadMethodCallException(code: 0): Method Illuminate\Auth\RequestGuard::attempt does not exist. at E:\laragon40\www\OKRsWalking\vendor\laravel\framework\src\Illuminate\Support\Traits\Macroable.php:102)
[stacktrace]
#0 E:\laragon40\www\OKRsWalking\app\Http\Controllers\Auth\LoginController.php(46): Illuminate\Auth\RequestGuard->__call('attempt', Array)
#1 E:\laragon40\www\OKRsWalking\vendor\laravel\framework\src\Illuminate\Foundation\Auth\AuthenticatesUsers.php(45): App\Http\Controllers\Auth\LoginController->attemptLogin(Object(Illuminate\Http\Request))
#2 [internal function]: App\Http\Controllers\Auth\LoginController->login(Object(Illuminate\Http\Request))
#3 E:\laragon40\www\OKRsWalking\vendor\laravel\framework\src\Illuminate\Routing\Controller.php(54): call_user_func_array(Array, Array)
#4 E:\laragon40\www\OKRsWalking\vendor\laravel\framework\src\Illuminate\Routing\ControllerDispatcher.php(45):

vue:无法进入到API.getUser().then的方法

vue:无法进入到API.getUser().then的方法,直接进到catch部分了
actions: {

getUser({commit}){
  commit('setUserGetStatus', 1);
  **UserAPI.getUser().then(function(response){
    console.info("then user: " + response.data + ', user = ' + user + ', UserGetStatus: ' + response);		
    commit('setUser', response.data);
	commit('setUserGetStatus', 2);**
  }).catch(function(){
    commit('setUser', {});
	commit('setUserGetStatus', 3);
    console.info("catch user: null, UserGetStatus: 3, response = ");
  });
},

make:test并创建test case之后一直无法进入对应Controller

Failed asserting that '{\n
"message": "This action is unauthorized.",\n
"exception": "Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException",\n
"file": "E:\laragon32\www\OKRsWalking\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\Handler.php",\n
"line": 202,\n

npm install error 4048

npm ERR! path E:\SouthernPowerGridProject\web_project\AutoOPS\autoops\node_modules\fsevents\node_modules\dashdash\node_modules
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall scandir
npm ERR! Error: EPERM: operation not permitted, scandir 'E:\SouthernPowerGridProject\web_project\AutoOPS\autoops\node_modules\fsevents\node_modules\dashdash\node_modules'
npm ERR!  { Error: EPERM: operation not permitted, scandir 'E:\SouthernPowerGridProject\web_project\AutoOPS\autoops\node_modules\fsevents\node_modules\dashdash\node_modules'
npm ERR!   stack: 'Error: EPERM: operation not permitted, scandir 'E:\SouthernPowerGridProject\web_project\AutoOPS\autoops\node_modules\fsevents\node_modules\dashdash\node_modules'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'scandir',
npm ERR!   path: 'E:\SouthernPowerGridProject\web_project\AutoOPS\autoops\node_modules\fsevents\node_modules\dashdash\node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ThinkT420\AppData\Roaming\npm-cache_logs\2017-10-30T06_50_38_610Z-debug.log

作者:QC班长
来源:CSDN
原文:https://blog.csdn.net/qq_35624642/article/details/78393035
版权声明:本文为博主原创文章,转载请附上博文链接!

connection could not be established with host smtp.qq.com

connection could not be established with host smtp.qq.com [Unable to find the socket transport "test" - did you forget to enable it when you configured PHP? #-2092507384]
E:\laragon40\www\OKRsing\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\StreamBuffer.php#269

[2019-09-19 22:32:38] local.ERROR: Connection could not be established with host smtp.qq.com [php_network_getaddresses: getaddrinfo failed: ??֪??????????? #0]
[2019-09-19 22:32:38] local.ERROR: Malformed UTF-8 characters, possibly incorrectly encoded {"exception":"[object] (InvalidArgumentException(code: 0): Malformed UTF-8 characters, possibly incorrectly encoded at E:\laragon40\www\OKRsing\vendor\laravel\framework\src\Illuminate\Http\JsonResponse.php:75)
[stacktrace]
#0 E:\laragon40\www\OKRsing\vendor\symfony\http-foundation\JsonResponse.php(50): Illuminate\Http\JsonResponse->setData(Array)

[2019-09-19 22:59:26] local.ERROR: Expected response code 220 but got an empty response {"exception":"[object] (Swift_TransportException(code: 0): Expected response code 220 but got an empty response at E:\laragon40\www\OKRsing\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\AbstractSmtpTransport.php:445)
[stacktrace]
#0 E:\laragon40\www\OKRsing\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\AbstractSmtpTransport.php(358): Swift_Transport_AbstractSmtpTransport->assertResponseCode('', Array)
#1 E:\laragon40\www\OKRsing\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\AbstractSmtpTransport.php(147): Swift_Transport_AbstractSmtpTransport->readGreeting()
#2 E:\laragon40\www\OKRsing\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Mailer.php(65): Swift_Transport_AbstractSmtpTransport->start()
#3 E:\laragon40\www\OKRsing\vendor\laravel\framework\src\Illuminate\Mail\Mailer.php(484): Swift_Mailer->send(Object(Swift_Message), Array)
#4 E:\laragon40\www\OKRsing\vendor\laravel\framework\src\Illuminate\Mail\Mailer.php(259): Illuminate\Mail\Mailer->sendSwiftMessage(Object(Swift_Message))
#5 E:\laragon40\www\OKRsing\vendor\laravel\framework\src\Illuminate\Notifications\Channels\MailChannel.ph

$this->json('get', '/api/okrs', $headers)->assertStatus(200);

	$user = User::find(rand(1,5));
	if ($user == null)
		$user = factory(User::class)->create();
    Log::info(__CLASS__ . '::' . __FUNCTION__  . ', user = ' . $user->id);
    $token = $user->createToken('token', [])->accessToken;
    $headers = ['Authorization' => "Bearer $token"];

$this->json('get', '/api/okrs', $headers)->assertStatus(200);

[2019-11-07 23:57:08] testing.INFO: Tests\Feature\AnnualObjectsAPITest::testIndex, user = 1
[2019-11-07 23:57:08] testing.ERROR: syntax error, unexpected 'try' (T_TRY) {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): syntax error, unexpected 'try' (T_TRY) at E:\laragon40\www\OKRsing\app\Http\Controllers\AnnualObjectsController.php:81)
[stacktrace]
#0 E:\laragon40\www\OKRsing\vendor\composer\ClassLoader.php(322): Composer\Autoload\includeFile('E:\\laragon40\\ww...')
#1 [internal function]: Composer\Autoload\ClassLoader->loadClass('App\\Http\\Contro...')

v-if 对应的元素中,reveal无法弹出模拟框,不生效

以下代码
vue组件中,其中,user的确是null的,可以显示“show-modal” button,但是对应的exampleModal1模拟框不生效:

<template v-if="user == null">
  <div class="reveal" id="exampleModal1" data-reveal>
    <h1>Awesome. I Have It.</h1>
    <button class="close-button" data-close aria-label="Close modal" type="button">
      <span aria-hidden="true">&times;</span>
    </button>
  </div>
</template>
<p><button class="button" data-open="exampleModal1">show-modal</button></p>

could not be opened in append mode: failed to open stream: Permission denied"

UnexpectedValueException thrown with message "The stream or file "/var/www/project/storage/logs/laravel-2020-12-07.log" could not be opened in append mode: failed to open stream: Permission denied"

Stacktrace:
#11 UnexpectedValueException in /var/www/project/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:110
#10 Monolog\Handler\StreamHandler:write in /var/www/project/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php:120
#9 Monolog\Handler\RotatingFileHandler:write in /var/www/project/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php:39
#8 Monolog\Handler\AbstractProcessingHandler:handle in /var/www/project/vendor/monolog/monolog/src/Monolog/Logger.php:344
#7 Monolog\Logger:addRecord in /var/www/project/vendor/monolog/monolog/src/Monolog/Logger.php:712
#6 Monolog\Logger:error in /var/www/project/vendor/laravel/framework/src/Illuminate/Log/Logger.php:176
#5 Illuminate\Log\Logger:writeLog in /var/www/project/vendor/laravel/framework/src/Illuminate/Log/Logger.php:87
#4 Illuminate\Log\Logger:error in /var/www/project/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:500
#3 Illuminate\Log\LogManager:error in /var/www/project/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:118
#2 Illuminate\Foundation\Exceptions\Handler:report in /var/www/project/app/Exceptions/Handler.php:37
#1 App\Exceptions\Handler:report in /var/www/project/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:92
#0 Illuminate\Foundation\Bootstrap\HandleExceptions:handleException in [internal]:0

laragon nginx can't start:

could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32
2009/02/20 13:54:27 [emerg] 11372#0: the configuration file /opt/nginx/conf/nginx.conf test failed

testing.ERROR: Session store not set on request

phpunit
testing.ERROR: Session store not set on request
[2019-10-11 23:08:57] testing.ERROR: Session store not set on request. {"userId":943,"exception":"[object] (RuntimeException(code: 0): Session store not set on request. at E:\laragon40\www\OKRsing\vendor\laravel\framework\src\Illuminate\Http\Request.php:482)
[stacktrace]
#0 E:\laragon40\www\OKRsing\vendor\laravel\passport\src\Http\Middleware\CreateFreshApiToken.php(54):

Expected status code 200 but received 500.

Expected status code 200 but received 500.

  1. Tests\Feature\AnnualObjectsTest::testIndex
    Expected status code 200 but received 500.
    Failed asserting that false is true.

E:\laragon40\www\OKRsing\vendor\laravel\framework\src\Illuminate\Foundation\Testing\TestResponse.php:151
E:\laragon40\www\OKRsing\tests\Feature\AnnualObjectsTest.php:352) Tests\Feature\DailyActivitiesTest::testIndex
Expected status code 200 but received 500.
Failed asserting that false is true.

Undefined index array offset

发现在repository下,无法获得object的field内容。
if ($annualObject['progress'] != 2){
Log::info(CLASS . '::' .FUNCTION . ' : ' . 'id = ' . $id . ', progress = ' . $annualObject['progress']);
if (request()->wantsJson()) {
return response()->json([
'error' => true,
'message' => '目标不在未开始状态,不可删除'
]);
}
return redirect()->back()->withErrors('目标不在未开始状态,不可删除')->withInput();
}

提示
[2018-08-10 11:35:45] testing.ERROR: Undefined index: progress {"userId":1,"email":"[email protected]","exception":"[object] (ErrorException(code: 0): Undefined index: progress at D:\laragon\www\OKRsWalking\vendor\laravel\framework\src\Illuminate\Support\Collection.php:1779)
[stacktrace]
#0 D:\laragon\www\OKRsWalking\vendor\laravel\framework\src\Illuminate\Support\Collection.php(1779): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, 'Undefined index...', 'D:\\laragon\\www\\...', 1779, Array)
#1 D:\laragon\www\OKRsWalking\app\Http\Controllers\AnnualObjectsController.php(398): Illuminate\Support\Collection->offsetGet('progress')
#2 [internal function]: App\Http\Controllers\AnnualObjectsController->destroy('4')

Error in v-on handler (Promise/async): "Error: Request failed with status code 403" This action is unauthorized

[Vue warn]: Error in v-on handler (Promise/async): "Error: Request failed with status code 403"

found in

---> at resources/js/pages/okrs/index.vue
at resources/js/components/Child.vue
at resources/js/layouts/default.vue

warn @ vue.common.dev.js?ed88:630
logError @ vue.common.dev.js?ed88:1889
globalHandleError @ vue.common.dev.js?ed88:1884
handleError @ vue.common.dev.js?ed88:1844
(anonymous) @ vue.common.dev.js?ed88:1861
Promise rejected (async)
invokeWithErrorHandling @ vue.common.dev.js?ed88:1861
invoker @ vue.common.dev.js?ed88:2184
original._wrapper @ vue.common.dev.js?ed88:7537
vue.common.dev.js?ed88:1893 Error: Request failed with status code 403
at createError (createError.js?cc5a:16)
at settle (settle.js?cc26:18)
at XMLHttpRequest.handleLoad (xhr.js?eda7:59)

F12调试模式下:

  1. {data: {…}, status: 403, statusText: "Forbidden", headers: {…}, config: {…}, …}
  2. config:
  3. adapter: ƒ xhrAdapter(config)
  4. data: "{"anObject":"","classify":3}"
  5. headers: {Accept: "application/json,
  6. text/plain, /", X-Requested-With: "XMLHttpRequest", X-CSRF-TOKEN: "", Authorization: "Bearer
  7. eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI…93X8MlWtOwcZ05-gVoQLuIPTxzuC8Ja40EETzYYr92v7qAzec", Accept-Language: "zh-CN", …}
  8. maxContentLength: -1
  9. method: "post"
  10. timeout: 0
  11. transformRequest: {0: ƒ}
  12. transformResponse: {0: ƒ}
  13. url: "/api/okrs"
  14. validateStatus: ƒ validateStatus(status)
  15. xsrfCookieName: "XSRF-TOKEN"
  16. xsrfHeaderName: "X-XSRF-TOKEN"
  17. proto: Object
  18. data: {**message: "This
  19. action is unauthorized."**, exception: "Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException", file: "E:\laragon40\www\OKRsing\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\Handler.php", line: 206, trace: Array(45)}
  20. headers: {cache-control: "no-cache,
  21. private", connection: "keep-alive", content-type: "application/json", date: "Tue,
  22. 31 Mar 2020 15:30:47 GMT", phpdebugbar-id: "X7612eeaf141d7a037fcc8fd40342cdc1", …}
  23. request: XMLHttpRequest {readyState: 4, timeout: 0, withCredentials: false, upload: XMLHttpRequestUpload, onreadystatechange: ƒ, …}
  24. status: 403
  25. statusText: "Forbidden"
  26. proto: Object

Illuminate\Database\Query\Builder::newInstance does not exist

[2018-10-13 22:20:46] local.ERROR: App\Jobs\AutoCleanUpUsersActivities::CleanUpUsersActivities, Fail, 出现异常,请联系客服!e = BadMethodCallException: Method Illuminate\Database\Query\Builder::newInstance does not exist. in E:\laragon32\www\OKRsWalking\vendor\laravel\framework\src\Illuminate\Database\Query\Builder.php:2526
Stack trace:
#2 E:\laragon32\www\OKRsWalking\app\Jobs\AutoCleanUpUsersActivities.php(85): Prettus\Repository\Eloquent\BaseRepository->update(Array, 266)

import ~/components These dependencies were not found

These dependencies were not found:
 ~/components in ./resources/js/app.js
 ~/plugins in ./resources/js/app.js
ERROR in ./resources/js/app.js
Module not found: Error: Can't resolve '~/components' in 'e:\laragon40\www\OKRsWalking\resources\js'
 @ ./resources/js/app.js 72:0-22
 @ multi ./resources/js/app.js ./resources/sass/app.scss

ERROR in ./resources/js/app.js
Module not found: Error: Can't resolve '~/plugins' in 'e:\laragon40\www\OKRsWalking\resources\js'
 @ ./resources/js/app.js 71:0-19
 @ multi ./resources/js/app.js ./resources/sass/app.scss

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.