elmish / templates

Other
42 stars 21 forks source link

Running the demo fails with `Module not found: Error: Can't resolve 'C:\scripts2\fable-elmishdemo\fable_elmishdemo.fsproj` #21

Closed fbehrens closed 7 years ago

fbehrens commented 7 years ago

When I try this demo i got the error message

ERROR in multi (webpack)-dev-server/client?http://localhost:8080 ./fable_elmishdemo.fsproj
Module not found: Error: Can't resolve 'C:\scripts2\fable-elmishdemo\fable_elmishdemo.fsproj' in 'C:\scripts2\fable-elmishdemo'
 @ multi (webpack)-dev-server/client?http://localhost:8080 ./fable_elmishdemo.fsproj
webpack: Failed to compile.

My machine configuration is

OS Name:                   Microsoft Windows 10 Enterprise
OS Version:                10.0.15063 N/A Build 15063
yarn install v0.27.5
.NET Command Line Tools (1.0.4)

see below the steps to reproduce

02> dotnet new -i Fable.Template.Elmish.React.Demo::*
  Restoring packages for C:\Users\imbeh\.templateengine\dotnetcli\v1.0.4\scratch\restore.csproj...
  Installing System.Xml.XPath 4.0.1.
  Installing runtime.native.System.IO.Compression 4.1.0.
  Installing Microsoft.NETCore.DotNetHost 1.0.1.
  Installing Microsoft.NETCore.Targets 1.0.1.
  Installing System.Xml.XPath.XDocument 4.0.1.
  Installing Microsoft.NETCore.App 1.0.5.
  Installing System.Xml.XmlDocument 4.0.1.
  Installing Fable.Template.Elmish.React.Demo 0.1.3.
  Installing System.Text.Encoding.CodePages 4.0.1.
  Installing Libuv 1.9.1.
  Installing Microsoft.CodeAnalysis.CSharp 1.3.0.
  Installing System.Diagnostics.StackTrace 4.0.1.
  Installing System.Diagnostics.FileVersionInfo 4.0.0.
  Installing Microsoft.CodeAnalysis.Analyzers 1.1.0.
  Installing Microsoft.NETCore.Targets 1.0.3.
  Installing System.Security.Cryptography.Csp 4.0.0.
  Installing System.Security.Cryptography.Cng 4.2.0.
  Installing Microsoft.CodeAnalysis.VisualBasic 1.3.0.
  Installing System.Security.Principal 4.0.1.
  Installing Microsoft.CSharp 4.0.1.
  Installing System.Security.Claims 4.0.1.
  Installing runtime.native.System.Net.Security 4.0.1.
  Installing Microsoft.NETCore.DotNetHostPolicy 1.0.5.
  Installing Microsoft.NETCore.Platforms 1.0.2.
  Installing Microsoft.NETCore.Runtime.CoreCLR 1.0.7.
  Installing Microsoft.VisualBasic 10.0.1.
  Installing System.Security.Principal.Windows 4.0.0.
  Installing NETStandard.Library 1.6.0.
  Installing System.Buffers 4.0.0.
  Installing System.Collections.Immutable 1.2.0.
  Installing System.ComponentModel 4.0.1.
  Installing System.ComponentModel.Annotations 4.1.0.
  Installing System.Diagnostics.DiagnosticSource 4.0.0.
  Installing System.Diagnostics.Process 4.1.0.
  Installing System.Dynamic.Runtime 4.0.11.
  Installing System.Globalization.Extensions 4.0.1.
  Installing System.IO.FileSystem.Watcher 4.0.0.
  Installing System.IO.MemoryMappedFiles 4.0.0.
  Installing System.IO.UnmanagedMemoryStream 4.0.1.
  Installing System.Linq.Expressions 4.1.1.
  Installing System.Linq.Parallel 4.0.1.
  Installing System.Linq.Queryable 4.0.1.
  Installing System.Net.Http 4.1.2.
  Installing System.Net.NameResolution 4.0.0.
  Installing System.Net.Requests 4.0.11.
  Installing System.Net.Security 4.0.1.
  Installing System.Net.WebHeaderCollection 4.0.1.
  Installing System.Numerics.Vectors 4.1.1.
  Installing System.Reflection.DispatchProxy 4.0.1.
  Installing System.Reflection.Metadata 1.3.0.
  Installing System.Reflection.TypeExtensions 4.1.0.
  Installing System.Resources.Reader 4.0.0.
  Installing System.Runtime.Loader 4.0.0.
  Installing System.Security.Cryptography.Algorithms 4.2.0.
  Installing System.Security.Cryptography.Encoding 4.0.0.
  Installing System.Security.Cryptography.OpenSsl 4.0.0.
  Installing System.Security.Cryptography.Primitives 4.0.0.
  Installing runtime.native.System.Net.Http 4.0.1.
  Installing System.Security.Cryptography.X509Certificates 4.1.0.
  Installing System.Threading.Tasks.Dataflow 4.6.0.
  Installing System.Threading.Tasks.Extensions 4.0.0.
  Installing System.Threading.Tasks.Parallel 4.0.1.
  Installing System.Threading.Thread 4.0.0.
  Installing System.Threading.ThreadPool 4.0.10.
  Installing runtime.native.System.Security.Cryptography 4.0.1.
  Installing Microsoft.CodeAnalysis.Common 1.3.0.
  Installing System.Collections 4.0.11.
  Installing System.Diagnostics.Debug 4.0.11.
  Installing System.Globalization 4.0.11.
  Installing System.Linq 4.1.0.
  Installing System.ObjectModel 4.0.12.
  Installing System.Reflection.Emit.Lightweight 4.0.1.
  Installing System.Reflection 4.1.0.
  Installing System.Reflection.Extensions 4.0.1.
  Installing System.Reflection.Primitives 4.0.1.
  Installing System.Resources.ResourceManager 4.0.1.
  Installing System.Runtime 4.1.0.
  Installing System.Runtime.Extensions 4.1.0.
  Installing System.Runtime.InteropServices 4.1.0.
  Installing System.Threading 4.0.11.
  Installing Microsoft.NETCore.DotNetHostResolver 1.0.1.
  Installing Microsoft.NETCore.Jit 1.0.7.
  Installing Microsoft.NETCore.Windows.ApiSets 1.0.1.
  Installing Microsoft.Win32.Primitives 4.0.1.
  Installing System.AppContext 4.1.0.
  Installing System.Collections.Concurrent 4.0.12.
  Installing System.Console 4.0.0.
  Installing System.Diagnostics.Tools 4.0.1.
  Installing System.Diagnostics.Tracing 4.1.0.
  Installing System.Globalization.Calendars 4.0.1.
  Installing System.IO 4.1.0.
  Installing System.IO.Compression 4.1.0.
  Installing System.IO.Compression.ZipFile 4.0.1.
  Installing System.IO.FileSystem 4.0.1.
  Installing System.IO.FileSystem.Primitives 4.0.1.
  Installing System.Net.Primitives 4.0.11.
  Installing System.Net.Sockets 4.1.0.
  Installing System.Runtime.Handles 4.0.1.
  Installing System.Runtime.InteropServices.RuntimeInformation 4.0.0.
  Installing System.Runtime.Numerics 4.0.1.
  Installing System.Text.Encoding 4.0.11.
  Installing System.Text.Encoding.Extensions 4.0.11.
  Installing System.Text.RegularExpressions 4.1.0.
  Installing System.Threading.Tasks 4.0.11.
  Installing System.Threading.Timer 4.0.1.
  Installing System.Xml.ReaderWriter 4.0.11.
  Installing System.Xml.XDocument 4.0.11.
  Installing Microsoft.Win32.Registry 4.0.0.
  Installing runtime.native.System 4.0.0.
  Installing System.Reflection.Emit 4.0.1.
  Installing System.Reflection.Emit.ILGeneration 4.0.1.
  Installing System.Threading.Overlapped 4.0.1.
  Generating MSBuild file C:\Users\imbeh\.templateengine\dotnetcli\v1.0.4\scratch\obj\restore.csproj.nuget.g.props.
  Generating MSBuild file C:\Users\imbeh\.templateengine\dotnetcli\v1.0.4\scratch\obj\restore.csproj.nuget.g.targets.
  Writing lock file to disk. Path: C:\Users\imbeh\.templateengine\dotnetcli\v1.0.4\scratch\obj\project.assets.json
  Restore completed in 25.33 sec for C:\Users\imbeh\.templateengine\dotnetcli\v1.0.4\scratch\restore.csproj.

  NuGet Config files used:
      C:\Users\imbeh\AppData\Roaming\NuGet\NuGet.Config
      C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config

  Feeds used:
      https://api.nuget.org/v3/index.json
      C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\

  Installed:
      112 package(s) to C:\Users\imbeh\.templateengine\dotnetcli\v1.0.4\scratch\restore.csproj
Templates                        Short Name                   Language      Tags
----------------------------------------------------------------------------------------------
Console Application              console                      [C#], F#      Common/Console
Class library                    classlib                     [C#], F#      Common/Library
Simple Fable App                 fable                        F#            Fable
Fable.Elmish.React.Demo App      fable-elmish-react-demo      F#            Fable/Elmish/React
Unit Test Project                mstest                       [C#], F#      Test/MSTest
xUnit Test Project               xunit                        [C#], F#      Test/xUnit
ASP.NET Core Empty               web                          [C#]          Web/Empty
ASP.NET Core Web App             mvc                          [C#], F#      Web/MVC
ASP.NET Core Web API             webapi                       [C#]          Web/WebAPI
Solution File                    sln                                        Solution

Examples:
    dotnet new mvc --auth None --framework netcoreapp1.1
    dotnet new fable-elmish-react-demo
    dotnet new --help
03> dotnet new fable-elmish-react -n fable-elmishdemo
Content generation time: 5332.4386 ms
The template "Fable.Elmish.React.Demo App" created successfully.
04> cd .\fable-elmishdemo\
05> yarn install
yarn install v0.27.5
[1/4] Resolving packages...
[2/4] Fetching packages...
warning fsevents@1.1.1: The platform "win32" is incompatible with this module.
info "fsevents@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 53.53s.
64 PS5 AD-BAYER-CNB\IMBEH@WDELEVC2884 {bayer} C:\scripts2\fable-elmishdemo
06> dotnet restore
  Paket version 5.6.11
   - C:\scripts2\fable-elmishdemo\obj\fable-elmishdemo.fsproj.references created
   - C:\scripts2\fable-elmishdemo\obj\fable-elmishdemo.fsproj.paket.clitools created
   - C:\scripts2\fable-elmishdemo\obj\fable-elmishdemo.fsproj.paket.props created
  Downloading Fable.PowerPack 1.1
  Downloading Fable.Elmish 0.9.1
  Downloading Fable.Elmish.React 0.9
  Downloading dotnet-fable 1.1.7
  Downloading Fable.Elmish.Browser 0.9
  Downloading Fable.Elmish.Debugger 0.9
  Downloading Fable.React 1.1
  Downloading FSharp.Compiler.Tools 4.1.23
  Downloading FSharp.NET.Sdk 1.0.5
  Downloading System.Diagnostics.DiagnosticSource 4.3.1
  Could not detect any platforms from 'xamarintvos10'
  Could not detect any platforms from 'xamarinwatchos10'
  Performance:
   - Disk IO: 1 minute, 7 seconds
   - Average Download Time: 8 seconds
   - Number of downloads: 10
   - Average Request Time: 5 seconds
   - Number of Requests: 16
   - Runtime: 35 seconds
  Paket version 5.6.11
  Performance:
   - Disk IO: 306 milliseconds
   - Runtime: 1 second
  Restoring packages for C:\scripts2\fable-elmishdemo\fable-elmishdemo.fsproj...
  Restoring packages for C:\scripts2\fable-elmishdemo\fable-elmishdemo.fsproj...
  Generating MSBuild file C:\scripts2\fable-elmishdemo\obj\fable-elmishdemo.fsproj.nuget.g.props.
  Generating MSBuild file C:\scripts2\fable-elmishdemo\obj\fable-elmishdemo.fsproj.nuget.g.targets.
  Writing lock file to disk. Path: C:\scripts2\fable-elmishdemo\obj\project.assets.json
  Restore completed in 1.7 sec for C:\scripts2\fable-elmishdemo\fable-elmishdemo.fsproj.
  Restore completed in 2.54 sec for C:\scripts2\fable-elmishdemo\fable-elmishdemo.fsproj.

  NuGet Config files used:
      C:\scripts2\fable-elmishdemo\NuGet.Config
      C:\Users\imbeh\AppData\Roaming\NuGet\NuGet.Config
      C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config

  Feeds used:
      https://api.nuget.org/v3/index.json
07> dotnet fable yarn-run start
Fable daemon started on port 61225
CWD: C:\scripts2\fable-elmishdemo
cmd /C yarn run start
yarn run v0.27.5
$ webpack-dev-server
Bundling for development...
Project is running at http://localhost:8080/
webpack output is served from /
Content not from webpack is served from C:\scripts2\fable-elmishdemo\public
Hash: 6c3a72fefe45f905fe2a
Version: webpack 2.6.1
Time: 1156ms
        Asset    Size  Chunks                    Chunk Names
    bundle.js  316 kB       0  [emitted]  [big]  main
bundle.js.map  375 kB       0  [emitted]         main
chunk    {0} bundle.js, bundle.js.map (main) 302 kB [entry] [rendered]
   [35] (webpack)-dev-server/client?http://localhost:8080 5.68 kB {0} [built]
   [36] ./~/ansi-html/index.js 4.26 kB {0} [built]
   [37] ./~/ansi-regex/index.js 135 bytes {0} [built]
   [40] ./~/events/events.js 8.33 kB {0} [built]
   [41] ./~/html-entities/index.js 231 bytes {0} [built]
   [44] ./~/punycode/punycode.js 14.7 kB {0} [built]
   [47] ./~/querystring-es3/index.js 127 bytes {0} [built]
   [50] ./~/sockjs-client/lib/entry.js 244 bytes {0} [built]
   [76] ./~/strip-ansi/index.js 161 bytes {0} [built]
   [77] ./~/url/url.js 23.3 kB {0} [built]
   [78] ./~/url/util.js 314 bytes {0} [built]
   [79] (webpack)-dev-server/client/overlay.js 3.73 kB {0} [built]
   [80] (webpack)-dev-server/client/socket.js 897 bytes {0} [built]
   [82] (webpack)/hot/emitter.js 77 bytes {0} [built]
   [83] multi (webpack)-dev-server/client?http://localhost:8080 ./fable_elmishdemo.fsproj 40 bytes {0} [built]
     + 69 hidden modules

ERROR in multi (webpack)-dev-server/client?http://localhost:8080 ./fable_elmishdemo.fsproj
Module not found: Error: Can't resolve 'C:\scripts2\fable-elmishdemo\fable_elmishdemo.fsproj' in 'C:\scripts2\fable-elmishdemo'
 @ multi (webpack)-dev-server/client?http://localhost:8080 ./fable_elmishdemo.fsproj
webpack: Failed to compile.
Killing process...
Closing Fable daemon...
07> yarn -v
yarn install v0.27.5
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.55s.

08> dotnet -v
Unknown option: -v
.NET Command Line Tools (1.0.4)
Usage: ...

11> & "C:\Program Files (x86)\Microsoft SDKs\F#\4.1\Framework\v4.0\fsi.exe"
Microsoft (R) F# Interactive version 4.1
...
alfonsogarciacaro commented 7 years ago

Hi @fbehrens! At the moment the dotnet SDK templating engine has some issues when you add hyphens to the project folder, could you please try without? E.g. dotnet new fable-elmish-react -n elmishdemo

fbehrens commented 7 years ago

many thanks @alfonsogarciacaro Without hyphens it's working fine