umbraco / Umbraco-CMS

Umbraco is a free and open source .NET content management system helping you deliver delightful digital experiences.
https://umbraco.com
Other
4.49k stars 2.69k forks source link

Can not build with build.ps1 #9733

Closed JonathanE42 closed 3 years ago

JonathanE42 commented 3 years ago

I can't build Umbraco from source:

Bug summary

Exception calling "RunMethod" with "1" argument(s): "Exception calling "Build" with "0" argument(s): "Exception
calling "CompileUmbraco" with "0" argument(s): "Failed to compile Umbraco.Web.UI."""
At C:\Users\Jonathan\Desktop\Umbraco\Umbraco-CMS\build\build.ps1:561 char:5
+     $ubuild.RunMethod($command);
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ScriptMethodRuntimeException

Error!

MethodInvocationException: Exception calling "RunMethod" with "1" argument(s): "Exception calling "Build" with "0" argument(s): "Exception calling "CompileUmbraco" with "0" argument(s): "Failed to compile Umbraco.Web.UI."""
At C:\Users\Jonathan\Desktop\Umbraco\Umbraco-CMS\build\build.ps1:561:5
+ $ubuild.RunMethod($command);

MethodInvocationException: Exception calling "Build" with "0" argument(s): "Exception calling "CompileUmbraco" with "0" argument(s): "Failed to compile Umbraco.Web.UI.""
At C:\Users\Jonathan\Desktop\Umbraco\Umbraco-CMS\build\temp\Umbraco.Build.0.2.16\ps\Boot.ps1:35:5
+ $method.Invoke($arguments)

MethodInvocationException: Exception calling "CompileUmbraco" with "0" argument(s): "Failed to compile Umbraco.Web.UI."
At C:\Users\Jonathan\Desktop\Umbraco\Umbraco-CMS\build\build.ps1:510:5
+ $this.CompileUmbraco()

RuntimeException: Failed to compile Umbraco.Web.UI.
At C:\Users\Jonathan\Desktop\Umbraco\Umbraco-CMS\build\build.ps1:197:20
+ if (-not $?) { throw "Failed to compile Umbraco.Web.UI." }

Abort

Steps to reproduce

By following the guide (BUILD.md):

  1. git clone Umbraco-CMS (being on the v8/contrib branch)
  2. run build.ps1

Ends up raising the exception above.

nul800sebastiaan commented 3 years ago

Hi @JonathanE42, that's unfortunate!

First off, you never need to build Umbraco from source unless you plan to contribute. And if you're planning to contribute then that's awesome, thanks in advance!

I am not sure about this error exactly, I don't think I've seen it before. What happens when you build Umbraco in Visual Studio itself?

itsMasoud commented 3 years ago

Hi

I've experienced same issue. Here is the complete powershell output after entering build/build.ps1:

Download NuGet...
Umbraco.Build v0.2.16
Download 7-Zip...
Download VsWhere...
Download Semver...
Download Node...
Umbraco Cms Build
Umbraco.Build v0.2.16
Create clean web.config
Set environment
Restore NuGet
Logging to D:\Umbraco-CMS-8-contrib\build.tmp\nuget.restore.log
Compile Belle
Logging to D:\Umbraco-CMS-8-contrib\build.tmp\belle.log
Set hidden attribute on node_modules
Compile Umbraco
Logging to D:\Umbraco-CMS-8-contrib\build.tmp\msbuild.umbraco.log
Exception calling "RunMethod" with "1" argument(s): "Exception calling "Build" with "0" argument(s): "Exception
calling "CompileUmbraco" with "0" argument(s): "Failed to compile Umbraco.Web.UI."""
At D:\Umbraco-CMS-8-contrib\build\build
.ps1:561 char:5
+     $ubuild.RunMethod($command);
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ScriptMethodRuntimeException

Error!

MethodInvocationException: Exception calling "RunMethod" with "1" argument(s): "Exception calling "Build" with "0" argument(s): "Exception calling "CompileUmbraco" with "0" argument(s): "Failed to compile Umbraco.Web.UI."""
At D:\Umbraco-CMS-8-contrib\build\build.ps1:561:5
+ $ubuild.RunMethod($command);

MethodInvocationException: Exception calling "Build" with "0" argument(s): "Exception calling "CompileUmbraco" with "0" argument(s): "Failed to compile Umbraco.Web.UI.""
At D:\Umbraco-CMS-8-contrib\build\temp\Umbraco.Build.0.2.16\ps\Boot.ps1:35:5
+ $method.Invoke($arguments)

MethodInvocationException: Exception calling "CompileUmbraco" with "0" argument(s): "Failed to compile Umbraco.Web.UI."
At D:\Umbraco-CMS-8-contrib\build\build.ps1:510:5
+ $this.CompileUmbraco()

RuntimeException: Failed to compile Umbraco.Web.UI.
At D:\Umbraco-CMS-8-contrib\build\build.ps1:197:20
+ if (-not $?) { throw "Failed to compile Umbraco.Web.UI." }

Abort

I thought it would be better to try on a clean project. So I removed and unzipped source again and then tried to build it in Visual Studio and it ended up with 10 Errors and 64 warnings.

Error   CS0006  Metadata file 'D:\Umbraco-CMS-8-contrib\src\Umbraco.ModelsBuilder.Embedded\bin\Debug\Umbraco.ModelsBuilder.Embedded.dll' could not be found Umbraco.Web.UI  D:\Umbraco-CMS-8-contrib\src\Umbraco.Web.UI\CSC 1   Active
Error   CS0173  Type of conditional expression cannot be determined because there is no implicit conversion between 'int' and 'string'  Umbraco.Web D:\Umbraco-CMS-8-contrib\src\Umbraco.Web\Routing\PublishedRouter.cs 433 Active
Error   CS0006  Metadata file 'D:\Umbraco-CMS-8-contrib\src\Umbraco.Web\bin\Debug\Umbraco.Web.dll' could not be found   Umbraco.ModelsBuilder.Embedded  D:\Umbraco-CMS-8-contrib\src\Umbraco.ModelsBuilder.Embedded\CSC 1   Active
Error   CS0006  Metadata file 'D:\Umbraco-CMS-8-contrib\src\Umbraco.ModelsBuilder.Embedded\bin\Debug\Umbraco.ModelsBuilder.Embedded.dll' could not be found Umbraco.Tests   D:\Umbraco-CMS-8-contrib\src\Umbraco.Tests\CSC  1   Active
Error   CS0006  Metadata file 'D:\Umbraco-CMS-8-contrib\src\Umbraco.Web\bin\Debug\Umbraco.Web.dll' could not be found   Umbraco.Tests   D:\Umbraco-CMS-8-contrib\src\Umbraco.Tests\CSC  1   Active
Error   CS0006  Metadata file 'D:\Umbraco-CMS-8-contrib\src\Umbraco.Web\bin\Debug\Umbraco.Web.dll' could not be found   Umbraco.Web.UI  D:\Umbraco-CMS-8-contrib\src\Umbraco.Web.UI\CSC 1   Active
Error   CS0006  Metadata file 'D:\Umbraco-CMS-8-contrib\src\Umbraco.Web\bin\Debug\Umbraco.Web.dll' could not be found   Umbraco.TestData    D:\Umbraco-CMS-8-contrib\src\Umbraco.TestData\CSC   1   Active
Error   CS0006  Metadata file 'D:\Umbraco-CMS-8-contrib\src\Umbraco.Tests\bin\Debug\Umbraco.Tests.dll' could not be found   Umbraco.Tests.Benchmarks    D:\Umbraco-CMS-8-contrib\src\Umbraco.Tests.Benchmarks\CSC   1   Active
Error   CS0006  Metadata file 'D:\Umbraco-CMS-8-contrib\src\Umbraco.Web\bin\Debug\Umbraco.Web.dll' could not be found   Umbraco.Tests.Benchmarks    D:\Umbraco-CMS-8-contrib\src\Umbraco.Tests.Benchmarks\CSC   1   Active
Error   CS0006  Metadata file 'D:\Umbraco-CMS-8-contrib\src\Umbraco.Web.UI\bin\Umbraco.Web.UI.dll' could not be found   Umbraco.Tests.Benchmarks    D:\Umbraco-CMS-8-contrib\src\Umbraco.Tests.Benchmarks\CSC   1   Active

Raised warnings are: 2 from Umbraco.Core 2 from Umbraco.Examine 2 from Umbraco.ModelsBuilder.Embedded 56 from Umbraco.Web 2 from Umbraco.Web.UI

After looking into projects Debug folder, I realized it's empty in following projects: Umbraco.Tests Umbraco.Tests.Benchmarks Umbraco.Web

If I try to manually copy for example Umbraco.Web.dll from Umbraco 8.8.0 to 'D:\Umbraco-CMS-8-contrib\src\Umbraco.Web\bin\Debug\' folder, above numbers will raise up to 49 for errors and 109 for warnings.

nul800sebastiaan commented 3 years ago

Hmm, this is weird.. haven't seen this before! Can either of you please post the contents of the log files in ~\build.tmp\ to see what might be in there that's interesting?

itsMasoud commented 3 years ago

There is nothing but belle.log. It's from build inside visual studio. If I run the build.ps1 again it might be possible to find more log files. Would be appreciated if you can find out what's going on here.

### node version is:
v10.15.0
### npm version is:
6.4.1
### clean npm cache
npm : npm WARN using --force I sure hope you know what you are doing.
At D:\Umbraco-CMS-8-contrib\build\build.ps1:118 char:9
+         npm cache clean --force >> $log 2>&1
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (npm WARN using ... you are doing.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

### npm install
npm : npm WARN jsdom@16.4.0 requires a peer of canvas@^2.5.0 but none is installed. You must install peer dependencies 
yourself.
At D:\Umbraco-CMS-8-contrib\build\build.ps1:122 char:9
+         npm install >> $log 2>&1
+         ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (npm WARN jsdom@...ncies yourself.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

npm
 WARN
 ws@7.4.1 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.

npm
 WARN
 ws@7.4.1 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.

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":"win32","arch":"ia32"})

npm
 WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.1 (node_modules\karma\node_modules\fsevents):

npm

WARN

notsup
 SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.1: wanted {"os":"darwin","arch":"any"} (current: 
{"os":"win32","arch":"ia32"})

audited 1920 packages in 14.885s
found 739 vulnerabilities (698 low, 1 moderate, 40 high)
  run `npm audit fix` to fix them, or `npm audit` for details
>> False 27
### gulp build for version 8.11.1

> @ build D:\Umbraco-CMS-8-contrib\src\Umbraco.Web.UI.Client
> gulp build

[02:06:41] Using gulpfile D:\Umbraco-CMS-8-contrib\src\Umbraco.Web.UI.Client\gulpfile.js
[02:06:41] Starting 'build'...
[02:06:41] Starting 'dependencies'...
[02:06:41] Starting 'js'...
[02:06:41] Starting 'less'...
[02:06:41] Starting 'views'...
JS:  ./src/websitepreview/**/*.js  ->  ../Umbraco.Web.UI/Umbraco/js/umbraco.websitepreview.js
JS:  ./src/preview/**/*.js  ->  ../Umbraco.Web.UI/Umbraco/js/umbraco.preview.js
JS:  ./src/installer/**/*.js  ->  ../Umbraco.Web.UI/Umbraco/js/umbraco.installer.js
JS:  ./src/common/filters/**/*.js  ->  ../Umbraco.Web.UI/Umbraco/js/umbraco.filters.js
JS:  ./src/common/resources/**/*.js  ->  ../Umbraco.Web.UI/Umbraco/js/umbraco.resources.js
JS:  [ './src/common/services/**/*.js', './src/utilities.js' ]  ->  ../Umbraco.Web.UI/Umbraco/js/umbraco.services.js
JS:  ./src/common/interceptors/**/*.js  ->  ../Umbraco.Web.UI/Umbraco/js/umbraco.interceptors.js
JS:  [ './src/views/**/*.controller.js', './src/*.controller.js' ]  ->  ../Umbraco.Web.UI/Umbraco/js/umbraco.controllers.js
JS:  [ './src/common/directives/_module.js',
  './src/{common/directives,common/components}/**/*.js',
  './src/views/**/*.{directive,component}.js' ]  ->  ../Umbraco.Web.UI/Umbraco/js/umbraco.directives.js
LESS:  ./src/less/installer.less  ->  ../Umbraco.Web.UI/Umbraco/assets/css/installer.css
LESS:  ./src/less/pages/nonodes.less  ->  ../Umbraco.Web.UI/Umbraco/assets/css/nonodes.style.min.css
LESS:  ./src/less/canvas-designer.less  ->  ../Umbraco.Web.UI/Umbraco/assets/css/canvasdesigner.css
LESS:  ./src/less/belle.less  ->  ../Umbraco.Web.UI/Umbraco/assets/css/umbraco.css
LESS:  ./src/less/rte-content.less  ->  ../Umbraco.Web.UI/Umbraco/assets/css/rte-content.css
copying ./src/views/**/*.html to ../Umbraco.Web.UI/Umbraco/views/
copying ./src/common/directives/**/*.html to ../Umbraco.Web.UI/Umbraco/views/
copying ./src/common/components/**/*.html to ../Umbraco.Web.UI/Umbraco/views/
copying ./src/installer/steps/*.html to ../Umbraco.Web.UI/Umbraco/views/install/
[02:07:05] Finished 'less' after 24 s
[02:07:23] Finished 'js' after 42 s
[02:07:24] Finished 'views' after 43 s
[02:07:32] gulp-imagemin: Minified 233 images (saved 251 kB - 13.2%)
[02:07:32] Finished 'dependencies' after 51 s
[02:07:32] Starting 'testUnit'...
npm : (node:10424) ExperimentalWarning: The fs.promises API is experimental
At D:\Umbraco-CMS-8-contrib\build\build.ps1:128 char:9
+         npm run build --buildversion=$this.Version.Release >> $log 2> ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: ((node:10424) Ex...is experimental:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

[02:07:41] Finished 'testUnit' after 8.74 s
[02:07:41] Finished 'build' after 1 min
18 02 2021 02:07:41.951:INFO [karma-server]: Karma v4.4.1 server started at http://0.0.0.0:9876/
18 02 2021 02:07:41.968:INFO [launcher]: Launching browsers jsdom with concurrency unlimited
18 02 2021 02:07:41.976:INFO [launcher]: Starting browser jsdom
18 02 2021 02:07:42.516:INFO [umbraco-test-suite]: Connected on socket kCA5rdUTYtYE2czeAAAA with id 68202877

  create content dialog
    √ shows available child document types for the given node
    √ creates content directly when there are no blueprints
    √ shows list of blueprints when there are some
    √ creates blueprint when selected
    √ skips selection and creates first blueprint when configured to
    √ allows blank to be selected
    √ creates blank when selected
    √ hides blank when configured to

  edit media controller tests
    media edit controller init
      √ it should have an media object
      √ it should have an apps collection
      √ it should have added an info app

  Content picker controller tests
    content edit controller save and publish
      √ should define the default properties on construction
      √ should populate scope.renderModel
      √ Each rendermodel item should contain name, id and icon
      √ Removing an item should update renderModel, ids and model.value
      √ Adding an item should update renderModel, ids and model.value
      √ Adding a duplicate item should note update renderModel, ids and model.value

  Drop down controller tests
    initialization
      √ should define the default properties on construction
      √ should convert simple array to dictionary
      √ should allow an existing valid dictionary
      √ should not allow a non-array or non-dictionary

  RTE controller tests
    initialization
      √ should define the default properties on construction

  templates editor controller
    √ has ace editor

  valEmail directive tests
    EMAIL_REGEXP
      √ should validate email

  truncate filter
    √ empty string as input is expected to give an empty string
    √ null as input is expected to give an empty string
    √ undefined as input is expected to give an empty string
    √ null as noOfChars to result in 'test'
    √ undefined as noOfChars to result in 'test'
    √ null as appendDots to behave as false
    √ Expects 'test' to be truncated as 'test', when noOfChars=5, and appendDots=true
    √ Expects 'test ' to be truncated as 'test…', when noOfChars=4, and appendDots=true
    √ Expects 'test a long text with space' to be truncated as 'test …', when noOfChars=5, and appendDots=true
    √ Expects 'scenarios is a long word' to be truncated as 'scena…', when noOfChars=5, and appendDots=true
    √ Expects 'scenarios is a long word' to be truncated as 'scenarios …', when noOfChars=10, and appendDots=true
    √ Expects 'test' to be truncated as 'test', when noOfChars=5, and appendDots=false
    √ Expects 'test a long text with space' to be truncated as 'test ', when noOfChars=5, and appendDots=false
    √ Expects 'scenarios is a long word' to be truncated as 'scena', when noOfChars=5, and appendDots=false
    √ Expects 'scenarios is a long word' to be truncated as 'scenarios ', when noOfChars=10, and appendDots=false
    √ Expects 'test' to be truncated as 'test', when wordwise=false, and max=20, and tail=...
    √ Expects 'LoremIpsumLoremIpsumLoremIpsum' to be truncated as 'LoremIpsumLoremIpsum…', when wordwise=false, and max=20, and tail=null

  umbCmsJoinArray filter
    √ Blackbox tests with expected result='a, b, c'
    √ Blackbox tests with expected result='a b c'
    √ Blackbox tests with expected result='abc'
    √ Blackbox tests with expected result=''
    √ Blackbox tests with expected result=''
    √ Blackbox tests with expected result=', , '
    √ Blackbox tests with expected result='abc'
    √ Blackbox tests with expected error.  Input='test'
    √ Blackbox tests with expected error.  Input='null'
    √ Blackbox tests with expected error.  Input='undefined'

  appState tests
    Editor state
      √ Can set
      √ Can reset
      √ Throws when setting current
    Global state
      √ Can get/set state
      √ Throws when invalid key
    Section state
      √ Can get/set state
      √ Throws when invalid key
    Tree state
      √ Can get/set state
      √ Throws when invalid key
    Menu state
      √ Can get/set state
      √ Throws when invalid key

  Assets service tests
    Loading js assets
      √ Loads a javascript file

  blockEditorService tests
    init blockEditorModelObject
      √ fail if no model value
      √ return a object, with methods
      √ getBlockConfiguration provide the requested block configurtion
      √ load provides data for itemPicker
      √ getLayoutEntry has values
      √ getBlockObject has values
      √ getBlockObject syncs primitive values
      √ getBlockObject syncs values of object
      √ layout is referencing layout of propertyModel
      √ removeDataAndDestroyModel removes data
      √ getBlockObject of block with settings has values
      √ getBlockObject of block with settings syncs primative values
      √ getBlockObject of block with settings syncs values of object

  contentEditingHelper tests
    handles http validation errors
      √ handles validation errors for 400 results
      √ does not handle validation errors that are not 400
      √ does not handle validation errors that are 400 without model state
    handling validation errors
      √ adds a field level server validation error when name is invalid
      √ adds a property level server validation error when a property is invalid
      √ adds a property level server validation error with a specific field when a property is invalid
      √ adds a multiple property and field level server validation errors when they are invalid
    redirecting behavior after saving content
      √ does not redirect when editing existing content
      √ does a redirect when creating content with a valid name
      √ does not redirect when creating content with an invalid id
    wires up property values after saving
      √ does not update un-changed values

  content factory tests
    global content factory crud
      √ should return a content object, given an id
      √ should return a all children collection given an id
      √ should return paged children collection given an id

  content type factory tests
    global content type factory crud
      √ should return a allowed content type collection given a document id

  date helper tests
    converting to local moments
      √ converts from a positive offset
      √ converts from a negataive offset
    converting to server strings
      √ converts to a positive offset
      √ converts from a negataive offset

  angular event tests
    event handling
      √ will handle one non async process
      √ will handle 2 non async process
      √ will handle one async process
      √ POC will wait to execute after all handlers

  file manager tests
    file management
      √ adding a file adds to the collection
      √ adding a file with the same property id replaces the existing one
      √ clears all files

  icon helper tests
    converting icon formats to Belle formats
      √ detects a file based icon
      √ detects a legacy icon
      √ converts from legacy icon

  keyboard service tests
    Detecting key combinations
      √ Detects ctrl+s

  list view helper tests
    getButtonPermissions
      √ should update the currentIdsWithPermissions dictionary
      √ returns button permissions

  macro service tests
    generates macro syntax
      √ can parse syntax for macros
      √ can parse syntax for macros with aliases containing dots
      √ can parse syntax for macros when macroAlias is not the first parameter
      √ can parse syntax for macros with aliases containing whitespace and other chars
      √ can parse syntax for macros with body
      √ can generate syntax for macros
      √ can generate syntax for macros with no params
      √ can generate syntax for MVC
      √ can generate syntax for MVC with no params

  mediaHelper service tests
    formatFileTypes
      √ will ignore any empty strings passed as arguments
      √ includes prefixed dot when formatting

  navigation services tests
    determine if route change causes navigation
      √ navigates when parameters added
      √ navigates when parameters removed
      √ does not navigate when non routing parameters added
      √ does not navigate when non routing parameters changed
      √ does not navigate when non routing parameters removed

  notification tests
    global notifications crud
      √ should allow to add, get and remove notifications

  serverValidationManager tests
    managing field validation errors
      √ can add and retrieve field validation errors
      √ will return null for a non-existing field error
      √ detects if a field error exists
    managing property validation errors
      √ can retrieve property validation errors for a sub field
      √ can retrieve property validation errors for a sub field for culture
      √ can retrieve property validation errors for a sub field for segments
      √ can retrieve property validation errors for a sub field for culture with segments
      √ can add a property errors with multiple sub fields and it the first will be retreived with only the property alias
      √ will return null for a non-existing property error
      √ detects if a property error exists
      √ can remove a property error with a sub field specified
      √ can remove a property error and all sub field errors by specifying only the property
    managing culture validation errors
      √ can retrieve culture validation errors
    managing variant validation errors
      √ can retrieve variant validation errors
    managing complex editor validation errors
      √ create dictionary of id to ModelState
      √ create dictionary of id to ModelState with inherited errors
      √ add errors for ModelState with inherited errors
    validation error subscriptions
      √ can subscribe to a field error
      √ can get the field subscription callbacks
      √ can subscribe to a property error for both a property and its sub field
      √ can subscribe to a culture error for both a property and its sub field
      √ can subscribe to a property validation path prefix
      √ can subscribe to a property validation path suffix
      √ can subscribe to a property validation path contains

  service: templateHelper
    getInsertDictionarySnippet
      √ should return the snippet for inserting a dictionary item
    getInsertPartialSnippet
      √ should return the snippet for inserting a partial from the root
      √ should return the snippet for inserting a partial from a folder
      √ should return the snippet for inserting a partial from a nested folder
      √ should return the snippet for inserting a partial from a folder with spaces in its name
    getQuerySnippet
      √ should return the snippet for a query
    getRenderBodySnippet
      √ should return the snippet for render body
    getRenderSectionSnippet
      √ should return the snippet for defining a section
      √ should return the snippet for defining a mandatory section
    getAddSectionSnippet
      √ should return the snippet for implementing a section

  tree service tests
    tree cache
      √ does not cache with no args
      √ does not cache with no cacheKey
      √ caches by section with cache key
      √ caches by default content section with cache key
      √ removes by section with cache key
      √ removes cache by key regardless of section
      √ removes all section cache regardless of key
      √ removes all cache
      √ clears cache by key using a filter that returns null
      √ removes cache by key using a filter
      √ removes cache children for a parent id specified
    lookup plugin based trees
      √ can find a plugin based tree
      √ returns undefined for a not found tree
    Remove existing nodes
      √ hasChildren has to be updated on parent
    query existing node structure of the tree
      √ can get a descendant node with string id
      √ can get a descendant node
      √ returns null for a descendant node that doesnt exist
      √ can get a child node
      √ returns null for a child node that doesnt exist
      √ returns null for a descendant node that doesnt exist
      √ can get the root node from a child node
      √ can get the root node from the root node

  udiParser tests
    Parse UDI
      √ can parse a valid document UDI
      √ can parse a valid media UDI
      √ returns the full UDI when calling toString() on the returned value
      √ can parse an open UDI
      √ returns null if the input is invalid

  umbDataFormatter service tests
    formatting GET content data
      √ will set the same invariant property instance reference between all variants

  image helper tests
    basic utility methods return correct values
      √ detects an image based file

  model mapper tests
    maps basic entity
      √ can map content object
      √ throws when info is missing
      √ can map the minimum props

  umbRequestHelper tests
    formatting Urls
      √ can create a query string from name value pairs
      √ can create a url based on server vars
    Virtual Paths
      √ can convert virtual path to absolute url
      √ can convert absolute path to absolute url
      √ throws on invalid virtual path

  Utilities
    fromJson
      √ should deserialize json as object
      √ should return object as object
    toJson
      √ should delegate to JSON.stringify
      √ should format objects pretty
      √ should not serialize properties starting with $$
      √ should serialize properties starting with $
      √ should not serialize $window object
      √ should not serialize $document object
      √ should not serialize scope instances
      √ should serialize undefined as undefined

umbraco-test-suite: Executed 206 of 206 SUCCESS (3.119 secs / 2.147 secs)
TOTAL: 206 SUCCESS
nul800sebastiaan commented 3 years ago

Really not sure what is going on, but if it doesn't build in Visual Studio then you might have something missing in your build tooling.

I have had to install some framework targeting packs:

image

In Visual Studio installer I have these selected:

image

Might be worth reviewing your install for these bits.

Can I ask once more: is your intention to contribute to Umbraco? Or are you trying to build Umbraco from source for some other reason?

nul800sebastiaan commented 3 years ago

I'm going to close this for now, since it's been a while. Hope it works now!

JohnnyZhang0628 commented 3 years ago

Hello,I have similar an error when i build from source. this is i run build.ps1 get error

RemoteException: Message:
At D:\WorkSpace\Umbraco-CMS\build\build.ps1:128:9
+ npm run build --buildversion=$this.Version.Release >> $log 2>&1

RemoteException: [20:44:22] TypeError in plugin "gulp-imagemin"
At D:\WorkSpace\Umbraco-CMS\build\build.ps1:128:9
+ npm run build --buildversion=$this.Version.Release >> $log 2>&1

RemoteException: [20:44:22] 'dependencies' errored after 9.16 s
At D:\WorkSpace\Umbraco-CMS\build\build.ps1:128:9
+ npm run build --buildversion=$this.Version.Release >> $log 2>&1

Abort
Error!

then i cd src\Umbraco.Web.UI.Client> ,then i delete node_modules ,then npm install, and run npm run build ,npm ERR. it is error info

PS D:\WorkSpace\Umbraco-CMS\src\Umbraco.Web.UI.Client> npm run build

> @ build D:\WorkSpace\Umbraco-CMS\src\Umbraco.Web.UI.Client
> gulp build

[21:08:35] Using gulpfile D:\WorkSpace\Umbraco-CMS\src\Umbraco.Web.UI.Client\gulpfile.js
[21:08:35] Starting 'build'...
[21:08:35] Starting 'dependencies'...
[21:08:35] Starting 'js'...
[21:08:35] Starting 'less'...
[21:08:35] Starting 'views'...
[21:08:35] gulp-imagemin: Couldn't load default plugin "gifsicle"
[21:08:35] gulp-imagemin: Couldn't load default plugin "optipng"
JS:  ./src/websitepreview/**/*.js  ->  ../Umbraco.Web.UI/umbraco/js/umbraco.websitepreview.js
JS:  ./src/websitepreview/**/*.js  ->  ../Umbraco.Web.UI.NetCore/wwwroot/umbraco/js/umbraco.websitepreview.js
JS:  ./src/preview/**/*.js  ->  ../Umbraco.Web.UI/umbraco/js/umbraco.preview.js
JS:  ./src/preview/**/*.js  ->  ../Umbraco.Web.UI.NetCore/wwwroot/umbraco/js/umbraco.preview.js
JS:  ./src/installer/**/*.js  ->  ../Umbraco.Web.UI/umbraco/js/umbraco.installer.js
JS:  ./src/installer/**/*.js  ->  ../Umbraco.Web.UI.NetCore/wwwroot/umbraco/js/umbraco.installer.js
JS:  ./src/common/filters/**/*.js  ->  ../Umbraco.Web.UI/umbraco/js/umbraco.filters.js
JS:  ./src/common/filters/**/*.js  ->  ../Umbraco.Web.UI.NetCore/wwwroot/umbraco/js/umbraco.filters.js
JS:  ./src/common/resources/**/*.js  ->  ../Umbraco.Web.UI/umbraco/js/umbraco.resources.js
JS:  ./src/common/resources/**/*.js  ->  ../Umbraco.Web.UI.NetCore/wwwroot/umbraco/js/umbraco.resources.js
JS:  [ './src/common/services/**/*.js', './src/utilities.js' ]  ->  ../Umbraco.Web.UI/umbraco/js/umbraco.services.js
JS:  [ './src/common/services/**/*.js', './src/utilities.js' ]  ->  ../Umbraco.Web.UI.NetCore/wwwroot/umbraco/js/umbraco.services.js
JS:  ./src/common/interceptors/**/*.js  ->  ../Umbraco.Web.UI/umbraco/js/umbraco.interceptors.js
JS:  ./src/common/interceptors/**/*.js  ->  ../Umbraco.Web.UI.NetCore/wwwroot/umbraco/js/umbraco.interceptors.js
JS:  [ './src/views/**/*.controller.js', './src/*.controller.js' ]  ->  ../Umbraco.Web.UI/umbraco/js/umbraco.controllers.js
JS:  [ './src/views/**/*.controller.js', './src/*.controller.js' ]  ->  ../Umbraco.Web.UI.NetCore/wwwroot/umbraco/js/umbraco.controllers.js
JS:  [
  './src/common/directives/_module.js',
  './src/{common/directives,common/components}/**/*.js',
  './src/views/**/*.{directive,component}.js'
]  ->  ../Umbraco.Web.UI/umbraco/js/umbraco.directives.js
JS:  [
  './src/common/directives/_module.js',
  './src/{common/directives,common/components}/**/*.js',
  './src/views/**/*.{directive,component}.js'
]  ->  ../Umbraco.Web.UI.NetCore/wwwroot/umbraco/js/umbraco.directives.js
LESS:  ./src/less/installer.less  ->  ../Umbraco.Web.UI/umbraco/assets/css/installer.min.css
LESS:  ./src/less/installer.less  ->  ../Umbraco.Web.UI.NetCore/wwwroot/umbraco/assets/css/installer.min.css
LESS:  ./src/less/pages/nonodes.less  ->  ../Umbraco.Web.UI/umbraco/assets/css/nonodes.style.min.css
LESS:  ./src/less/pages/nonodes.less  ->  ../Umbraco.Web.UI.NetCore/wwwroot/umbraco/assets/css/nonodes.style.min.css
LESS:  ./src/less/canvas-designer.less  ->  ../Umbraco.Web.UI/umbraco/assets/css/canvasdesigner.min.css
LESS:  ./src/less/canvas-designer.less  ->  ../Umbraco.Web.UI.NetCore/wwwroot/umbraco/assets/css/canvasdesigner.min.css
LESS:  ./src/less/belle.less  ->  ../Umbraco.Web.UI/umbraco/assets/css/umbraco.min.css
LESS:  ./src/less/belle.less  ->  ../Umbraco.Web.UI.NetCore/wwwroot/umbraco/assets/css/umbraco.min.css
LESS:  ./src/less/rte-content.less  ->  ../Umbraco.Web.UI/umbraco/assets/css/rte-content.css
LESS:  ./src/less/rte-content.less  ->  ../Umbraco.Web.UI.NetCore/wwwroot/umbraco/assets/css/rte-content.css
copying ./src/views/**/*.html to ../Umbraco.Web.UI/umbraco/views/
copying ./src/views/**/*.html to ../Umbraco.Web.UI.NetCore/wwwroot/umbraco/views/
copying ./src/common/directives/**/*.html to ../Umbraco.Web.UI/umbraco/views/
copying ./src/common/directives/**/*.html to ../Umbraco.Web.UI.NetCore/wwwroot/umbraco/views/
copying ./src/common/components/**/*.html to ../Umbraco.Web.UI/umbraco/views/
copying ./src/common/components/**/*.html to ../Umbraco.Web.UI.NetCore/wwwroot/umbraco/views/
copying ./src/installer/steps/*.html to ../Umbraco.Web.UI/umbraco/views/install/
copying ./src/installer/steps/*.html to ../Umbraco.Web.UI.NetCore/wwwroot/umbraco/views/install/
[21:08:41] 'dependencies' errored after 5.93 s
[21:08:41] TypeError in plugin "gulp-imagemin"
Message:
    fn is not a function
Details:
    fileName: D:\WorkSpace\Umbraco-CMS\src\Umbraco.Web.UI.Client\src\assets\img\installer.jpg
    domainEmitter: [object Object]
    domainThrown: false

[21:08:41] 'build' errored after 5.93 s
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ build: `gulp build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ build 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\zq\AppData\Roaming\npm-cache\_logs\2021-07-07T13_08_41_477Z-debug.log

what should i do?

nul800sebastiaan commented 3 years ago

@JohnnyZhang0628 Check your npm version and node version

image

JohnnyZhang0628 commented 3 years ago

@nul800sebastiaan thanks reply .it my screenshoot. image

nul800sebastiaan commented 3 years ago

It's hard to read.. so npm 6 and node 14, that seems fine. And I'm assuming you are on the v8/contrib branch, which is where you should start with contributions.

Apart from deleting the node_modules folder if you have problems like this then I usually try to clear npm cache as well (so npm cache clean --force). If that doesn't help then I'm afraid you're going to have a whole lot of googling to do for your specific error, I usually can find the issue for npm related problems only after doing a very deep google session, reading a lot of things that are misleading and finally stumbling on good clues. 🙈

JohnnyZhang0628 commented 3 years ago

@nul800sebastiaan thansk reply.My branch is v9/dev.DotNet Core is cool.I am so happy to see the release-9.0.0-rc001 version publisned.

p-m-j commented 3 years ago

I have the same issue building Umbraco.Web.UI.Client in v9/dev

[16:48:40] TypeError in plugin "gulp-imagemin"
Message:
    fn is not a function
$ node -v
v16.6.1
$ npm -v
7.20.5
nul800sebastiaan commented 3 years ago

@p-m-j If you've switched from running a v8 branch to v9 then it's probably going to cause problems. Recommend you do a fresh clone of v9 in a different directory and run npm install and npm run build.

I just tried with those versions and.. it 'works on my machine'™️ 😅

p-m-j commented 3 years ago

Doesn't seem to work with newer node for me (on debian sid), but can work around with nvm

nvm install v14 --latest-npm
nvm use v14
npm ci
npm run build
nul800sebastiaan commented 3 years ago

Weird! I didn't have v16 yet, so I nvm installed that one just to make sure.. but glad it works for you.. somehow! 😅

For all the cursing I do towards NuGet, it's actually pretty ok in comparison to these inconsistencies.. 🙈

p-m-j commented 3 years ago

I can no longer reproduce on v16 I dropped nvm out of PATH and it works fine with system install also

:man_shrugging: