Sitecore / Habitat

Sitecore Modular Architecture Example
Other
413 stars 397 forks source link

installation gotchas #281

Open raigunn opened 7 years ago

raigunn commented 7 years ago

I set this up last Friday. I ran into a bunch of issues, worked through all of them, some with the help of posts here. So I wanted to post back some thanks and note the gotchas that got me in case it helps anyone else.

WFFM

NPM

Step 3: Publish All Projects

Double Slashes

Syncing with Unicorn

150 Character Path Limit

Package.xml locked

Thanks for all the help everyone!

Eldblom-zz commented 7 years ago

Amazing comments. Thanks @raigunn

codingdennis commented 7 years ago

Another thing worth noticing might be that all (except test projects) package.config files' build action are set to "Content" which means the package.config will be copied to the website while publishing. This is fine when publishing just one module. But when it comes to publishing all modules (such as running the default gulp task) and due to the number of modules the package.config in webroot sometimes get locked (I guess the previous file lock handle was not released yet) and the package.config from the module being copied cannot replace it and this will throw an exception and stop the task runner.

@Eldblom it might be worth changing all those package.config files' build action "None"?

sklagenberg commented 7 years ago

We had the same issue. You can fix it by excluding files from publishing in your global publishsettings.targets file: <ExcludeFilesFromDeployment>packages.config</ExcludeFilesFromDeployment> Reopen the solution or the change might not work.

codingdennis commented 7 years ago

Thanks @sklagenberg that is a good one :)

bchristie commented 7 years ago

@Eldblom RE: gulp

May make sense to add a "gulp" script (which npm will reference from node_modules/) and modify directions to run that script. e.g. (edit to (package.json`):

  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "build": "gulp"
  }

Now you can instruct users to run npm run build. (Alt. you could name it "start" and npm start would work, but makes it too ambiguous IMHO).

Just a thought. -bch

kwyc commented 7 years ago

Hi, I have trouble getting the sync-unicorn step to be executed.

I have tried running through Task Runner Explorer via Visual Studio and no luck, it just sits at "starting 05-sync-unicorn". I have also tried running it via command line, cmd.exe /c gulp -b "C:\Home\Habitat" --color --gulpfile "C:\Home\Habitat\Gulpfile.js" 05-Sync-Unicorn and it just sits there as well with no prompt for permission.

Any advise is appreciated. Thanks!

Karen

codingdennis commented 7 years ago

Hey @Karen,

Are you using latest master branch? Please check the following prerequisites:

Then, build the solution to see if everything builds and then run the default task in Task Runner Explorer. If it failed the first time, try more times. If it still does not work perhaps you can post some lines around where it went wrong from the Task Runner Explorer log window. Also check Sitecore logs see if there are suspicious exceptions.

Cheers, Dennis

kwyc commented 7 years ago

Hi @codingdennis,

Thanks for the quick response! Other than the point "requires Visual Studio 2017," everything else was updated. We have visual studio 2015. Also I can get grunt to build manually from step 01-04 without any issue.

There is no way around the 2017 requirement?

Regards, Karen

ahtisamafzal commented 6 years ago

Hi, @codingdennis, Thanks for listing down the requirements. I am using Sitecore 8.2 update-5 which seems to be using MongoDB.Driver 2.0 and the Habitat is using the older version and b/c of that as soon as you publish the project whole thing goes down.

Is this something which fairly new?

Meanwhile, I am downloading the 8.2 update-4 and give a try and see if that work ok

abajorunas commented 6 years ago

I am having problems on step 5 with MongoDB Exception Details: System.IO.FileLoadException: Could not load file or assembly 'MongoDB.Bson, Version=2.4 at MongoDB.Bson.Serialization.BsonClassMap.RegisterClassMap[TClass](Action1 classMapInitializer) at Sitecore.Analytics.Data.DataAccess.MongoDb.MongoDbObjectMapper.RegisterModelExtension[T]() .4.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) using Sitecore 8.2 update-5

any help would be appreciated.

nitinnegi commented 6 years ago

Hi All, I am hitting the same issues as abajournas. A fresh sitecore instance works fine, task manager till task-4 works fine. Task 5 fails, when try to access the site i get the same issue Could not load file or assembly 'MongoDB.Bson, Version=2.4.4.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'MongoDB.Bson, Version=2.4.4.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

nitinnegi commented 6 years ago

Hi All, Finally able to install habitat, following steps followed.

  1. Uninstalled mongodb 3.4 guess its not supported by habitat. This resolved the mongodb.beson issue.
  2. Need to unzip the WFFM zip and add the "Web Forms for Marketers 8.2 rev. 161129" as a module. This help to resolve the unicorn issue related to forms.
Eldblom-zz commented 6 years ago

Thanks @nitinnegi. Checking prerequisites Habitat and the specific version of Sitecore is vital for successful installation.

nitinnegi commented 6 years ago

Agreed.

wilson353 commented 6 years ago

@nitinnegi, I am running into the same issues. Did you revert mongodb from 3.4 to 3.2?

nitinnegi commented 6 years ago

No just uninstall it and then install Sitecore fresh.

On Fri, 17 Nov 2017 at 8:41 am, wilson353 notifications@github.com wrote:

@nitinnegi https://github.com/nitinnegi, I am running into the same issues. Did you revert mongodb from 3.4 to 3.2?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Sitecore/Habitat/issues/281#issuecomment-345071690, or mute the thread https://github.com/notifications/unsubscribe-auth/AYStKjJeJOnIYx3GVTOkINlmiDOzgRHMks5s3KwPgaJpZM4MNiSl .

-- Best Regards Nitin Negi 0414 227 425 Unless you try to do something beyond What you have already mastered, You will Never Grow :-Ronald E Osborn

Voodem commented 6 years ago

VS 2017 seems to be a prerequisite for Habitat. But can work with VS2015 as well. Only issue I faced was with MsBuild. Gulp task was referring to v15 of msbild. Had to change the version of msbuild in the gulp-config.js to '14'. Everything thing went well thereafter.

nestorodukoya commented 6 years ago

@nitinnegi

I uninstalled Mongo 3.4 completely, and did not try to install any lower version since you did not mention any step like that, and i still get that same error. Is their anything I should look at ?

[13:42:52] Starting '05-Sync-Unicorn'... Error: Invoke-WebRequest : Error:
Could not load file or assembly 'MongoDB.Bson, Version=1.10.0.62,

PaulJohnMaddison commented 6 years ago

Is anyone else having issues withthe builld deleting all the CSS files during the build ? I have tried to build the habitat v9 and V8.2.5 branches on both visual studio 2017 and 2015 and during the build the CSS files seem to get deleted. I am assuming this is an gulp-msbuild issue - I am using version 0.4.8 any ideas ?