Base solution for your next web application
Open Closed

AspNetZero V680 - JS Errors #6688


User avatar
0
exlnt created

As a follow-up to my last post here. I have now copied and merged all of my app level changes throughout the solution. The app runs fine, however I am getting some JS errors in the browser console, as shown below.

I have run the YARN command on the solution, before I ever opened in in VS2017. When I build the solution from VS2017 all of the bundles are created without any errors. However when I run the "npm run create-bundles" from the command line, it fails and logs the below errors into a log file.

9 verbose lifecycle [email protected]~create-bundles: CWD: X:\GIT\ABP\ANZCareOpsUpgrade.V680Upgrade\src\EXLNT.CareOps.Web.Mvc
10 silly lifecycle [email protected]~create-bundles: Args: [ '/d /s /c',
10 silly lifecycle   'gulp copy:node_modules && gulp minify:less && npm run bundle-clean:bundle' ]
11 silly lifecycle [email protected]~create-bundles: Returned: code: 1  signal: null
12 info lifecycle [email protected]~create-bundles: Failed to exec create-bundles script
13 verbose stack Error: [email protected] create-bundles: `gulp copy:node_modules && gulp minify:less && npm run bundle-clean:bundle`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Users\xxx\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:182:13)
13 verbose stack     at ChildProcess.<anonymous> (C:\Users\xxx\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:182:13)
13 verbose stack     at maybeClose (internal/child_process.js:962:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid [email protected]
15 verbose cwd X:\GIT\ABP\ANZCareOpsUpgrade.V680Upgrade\src\EXLNT.CareOps.Web.Mvc
16 verbose Windows_NT 10.0.17763
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\xxx\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "create-bundles"
18 verbose node v10.13.0
19 verbose npm  v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] create-bundles: `gulp copy:node_modules && gulp minify:less && npm run bundle-clean:bundle`
22 error Exit status 1
23 error Failed at the [email protected] create-bundles script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Here are the commands I ran from my command window.

**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.9.9
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
X:\GIT\ABP\ANZCareOpsUpgrade.V680Upgrade\src\EXLNT.CareOps.Web.Mvc>yarn
yarn install v1.12.3
warning package.json: No license field
warning [email protected]: No license field
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.35s.

X:\GIT\ABP\ANZCareOpsUpgrade.V680Upgrade\src\EXLNT.CareOps.Web.Mvc>npm run create-bundles

> [email protected] create-bundles X:\GIT\ABP\ANZCareOpsUpgrade.V680Upgrade\src\EXLNT.CareOps.Web.Mvc
> gulp copy:node_modules && gulp minify:less && npm run bundle-clean:bundle

[14:06:35] Using gulpfile X:\GIT\ABP\ANZCareOpsUpgrade.V680Upgrade\src\EXLNT.CareOps.Web.Mvc\gulpfile.js
[14:06:35] Starting 'copy:node_modules'...
[14:06:37] Finished 'copy:node_modules' after 1.81 s
[14:06:38] Using gulpfile X:\GIT\ABP\ANZCareOpsUpgrade.V680Upgrade\src\EXLNT.CareOps.Web.Mvc\gulpfile.js
[14:06:38] Starting 'minify:less'...
less()
{ [Error: 'bs/less/utilities.less' wasn't found. Tried - X:\GIT\ABP\ANZCareOpsUpgrade.V680Upgrade\src\EXLNT.CareOps.Web.Mvc\wwwroot\assets\Jcrop\src\css\bs\less\utilities.less,npm://bs\less\utilities.less,bs\less\utilities.less in file X:\GIT\ABP\ANZCareOpsUpgrade.V680Upgrade\src\EXLNT.CareOps.Web.Mvc\wwwroot\assets\Jcrop\src\css\_bootstrap.less line no. 63]
  message:
   '\'bs/less/utilities.less\' wasn\'t found. Tried - D:\\VisualStudioOnline\\GIT\\ABP\\ANZCareOpsUpgrade.V680Upgrade\\src\\EXLNT.CareOps.Web.Mvc\\wwwroot\\assets\\Jcrop\\src\\css\\bs\\less\\utilities.less,npm://bs\\less\\utilities.less,bs\\less\\utilities.less in file D:\\VisualStudioOnline\\GIT\\ABP\\ANZCareOpsUpgrade.V680Upgrade\\src\\EXLNT.CareOps.Web.Mvc\\wwwroot\\assets\\Jcrop\\src\\css\\_bootstrap.less line no. 63',
  stack: undefined,
  type: 'File',
  filename:
   'X:\\GIT\\ABP\\ANZCareOpsUpgrade.V680Upgrade\\src\\EXLNT.CareOps.Web.Mvc\\wwwroot\\assets\\Jcrop\\src\\css\\_bootstrap.less',
  index: 1670,
  line: 63,
  column: 0,
  callLine: NaN,
  callExtract: undefined,
  extract:
   [ '// Utility classes',
     '@import "bs/less/utilities.less"; // Has to be last to override when necessary',
     '' ],
  lineNumber: 63,
  fileName:
   'X:\\GIT\\ABP\\ANZCareOpsUpgrade.V680Upgrade\\src\\EXLNT.CareOps.Web.Mvc\\wwwroot\\assets\\Jcrop\\src\\css\\_bootstrap.less',
  name: 'Error',
  plugin: 'gulp-less',
  showProperties: true,
  showStack: false,
  __safety: { toString: [Function: bound ] } }
[14:06:39] The following tasks did not complete: minify:less
[14:06:39] Did you forget to signal async completion?
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] create-bundles: `gulp copy:node_modules && gulp minify:less && npm run bundle-clean:bundle`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] create-bundles 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\xxx\AppData\Roaming\npm-cache\_logs\2019-03-22T21_06_39_457Z-debug.log

X:\GIT\ABP\ANZCareOpsUpgrade.V680Upgrade\src\EXLNT.CareOps.Web.Mvc>

In VS2017 I searched the solution for utilities.less file and could not find it anywhere.

I searched for the file via windows explorer and did find the file in folder; \src\EXLNT.CareOps\Web\Public\bower_components\bootstrap\less, but nowhere in the .Mvc project. Is this the issue?


2 Answer(s)