Yesod 脚手架开发:"Failed to load interface for 'Application'"
Yesod scaffolded devel: "Failed to load interface for 'Application'"
我正在尝试 运行 一个带有 MySQL 的脚手架 Yesod 站点(在 Ubuntu 16.04 上)。但是当我尝试使用 devel 运行 它时,会发生以下错误:
app/devel.hs:2:1: error:
Failed to load interface for ‘Application’
It is not a module in the current program, or in any known package.
Unexpected: child process exited with ExitFailure 1
我已经尝试使用(从项目文件夹内):
stack exec -- yesod devel
yesod devel
两者都产生错误。
它确实有效运行使应用正常运行
stack install
stack exec my-project
lucas@lucas-ms-7673:~/Data/Projecten/basicwebsite$ stack clean
lucas@lucas-ms-7673:~/Data/Projecten/basicwebsite$ yesod devel
Yesod devel server. Enter 'quit' or hit Ctrl-C to quit.
Application can be accessed at:
http://localhost:3000
https://localhost:3443
If you wish to test https capabilities, you should set the following variable:
export APPROOT=https://localhost:3443
basicwebsite-0.0.0: unregistering (local file changes: Application.hs
Foundation.hs Handler/Comment.hs Handler/Common.hs Handler/Home.hs
Handler/Profile...)
basicwebsite-0.0.0: configure (lib)
Configuring basicwebsite-0.0.0...
basicwebsite-0.0.0: build (lib)
Preprocessing library basicwebsite-0.0.0...
[ 1 of 11] Compiling Settings ( Settings.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Settings.o )
[ 2 of 11] Compiling Settings.StaticFiles ( Settings/StaticFiles.hs,.stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Settings/StaticFiles.o )
[ 3 of 11] Compiling Model ( Model.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Model.o )
[ 4 of 11] Compiling Import.NoFoundation ( Import/NoFoundation.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Import/NoFoundation.o )
[ 5 of 11] Compiling Foundation ( Foundation.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Foundation.o )
[ 6 of 11] Compiling Import ( Import.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Import.o )
[ 7 of 11] Compiling Handler.Comment ( Handler/Comment.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Handler/Comment.o )
[ 8 of 11] Compiling Handler.Common ( Handler/Common.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Handler/Common.o )
[ 9 of 11] Compiling Handler.Home ( Handler/Home.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Handler/Home.o )
[10 of 11] Compiling Handler.Profile ( Handler/Profile.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Handler/Profile.o )
[11 of 11] Compiling Application ( Application.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Application.o )
basicwebsite-0.0.0: copy/register
Installing library in
/home/lucas/Data/Projecten/basicwebsite/.stack-work/install/x86_64-linux/lts-8.5/8.0.2/lib/x86_64-linux-ghc-8.0.2/basicwebsite-0.0.0-TYYyVjSz8i3CoGALY18CQ
Registering basicwebsite-0.0.0...
ExitSuccess
Type help for available commands. Press enter to force a rebuild.
app/devel.hs:2:1: error:
Failed to load interface for ‘Application’
It is not a module in the current program, or in any known package.
Unexpected: child process exited with ExitFailure 1
Trying again
lucas@lucas-ms-7673:~/Data/Projecten/basicwebsite$ stack exec ghc-pkg list basicwebsite
/home/lucas/.stack/programs/x86_64-linux/ghc-8.0.2/lib/ghc-8.0.2/package.conf.d
(no packages)
/home/lucas/.stack/snapshots/x86_64-linux/lts-8.5/8.0.2/pkgdb
(no packages)
/home/lucas/Data/Bedrijf/Projecten/basicwebsite/.stack-work/install/x86_64-linux/lts-8.5/8.0.2/pkgdb
basicwebsite-0.0.0
我遇到了这个确切的错误,并尝试删除项目并重新生成它,但没有成功。然而,一旦我升级了堆栈,它就完美地工作了:
$ stack upgrade
Current Stack version: 1.3.2, available download version: 1.4.0
Newer version detected, downloading
...
$ stack exec -- yesod devel
...
ExitSuccess
Type help for available commands. Press enter to force a rebuild.
Starting devel application
Devel application launched: http://localhost:3000
我正在尝试 运行 一个带有 MySQL 的脚手架 Yesod 站点(在 Ubuntu 16.04 上)。但是当我尝试使用 devel 运行 它时,会发生以下错误:
app/devel.hs:2:1: error:
Failed to load interface for ‘Application’
It is not a module in the current program, or in any known package.
Unexpected: child process exited with ExitFailure 1
我已经尝试使用(从项目文件夹内):
stack exec -- yesod devel
yesod devel
两者都产生错误。
它确实有效运行使应用正常运行
stack install
stack exec my-project
lucas@lucas-ms-7673:~/Data/Projecten/basicwebsite$ stack clean
lucas@lucas-ms-7673:~/Data/Projecten/basicwebsite$ yesod devel
Yesod devel server. Enter 'quit' or hit Ctrl-C to quit.
Application can be accessed at:
http://localhost:3000
https://localhost:3443
If you wish to test https capabilities, you should set the following variable:
export APPROOT=https://localhost:3443
basicwebsite-0.0.0: unregistering (local file changes: Application.hs
Foundation.hs Handler/Comment.hs Handler/Common.hs Handler/Home.hs
Handler/Profile...)
basicwebsite-0.0.0: configure (lib)
Configuring basicwebsite-0.0.0...
basicwebsite-0.0.0: build (lib)
Preprocessing library basicwebsite-0.0.0...
[ 1 of 11] Compiling Settings ( Settings.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Settings.o )
[ 2 of 11] Compiling Settings.StaticFiles ( Settings/StaticFiles.hs,.stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Settings/StaticFiles.o )
[ 3 of 11] Compiling Model ( Model.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Model.o )
[ 4 of 11] Compiling Import.NoFoundation ( Import/NoFoundation.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Import/NoFoundation.o )
[ 5 of 11] Compiling Foundation ( Foundation.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Foundation.o )
[ 6 of 11] Compiling Import ( Import.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Import.o )
[ 7 of 11] Compiling Handler.Comment ( Handler/Comment.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Handler/Comment.o )
[ 8 of 11] Compiling Handler.Common ( Handler/Common.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Handler/Common.o )
[ 9 of 11] Compiling Handler.Home ( Handler/Home.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Handler/Home.o )
[10 of 11] Compiling Handler.Profile ( Handler/Profile.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Handler/Profile.o )
[11 of 11] Compiling Application ( Application.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Application.o )
basicwebsite-0.0.0: copy/register
Installing library in
/home/lucas/Data/Projecten/basicwebsite/.stack-work/install/x86_64-linux/lts-8.5/8.0.2/lib/x86_64-linux-ghc-8.0.2/basicwebsite-0.0.0-TYYyVjSz8i3CoGALY18CQ
Registering basicwebsite-0.0.0...
ExitSuccess
Type help for available commands. Press enter to force a rebuild.
app/devel.hs:2:1: error:
Failed to load interface for ‘Application’
It is not a module in the current program, or in any known package.
Unexpected: child process exited with ExitFailure 1
Trying again
lucas@lucas-ms-7673:~/Data/Projecten/basicwebsite$ stack exec ghc-pkg list basicwebsite
/home/lucas/.stack/programs/x86_64-linux/ghc-8.0.2/lib/ghc-8.0.2/package.conf.d
(no packages)
/home/lucas/.stack/snapshots/x86_64-linux/lts-8.5/8.0.2/pkgdb
(no packages)
/home/lucas/Data/Bedrijf/Projecten/basicwebsite/.stack-work/install/x86_64-linux/lts-8.5/8.0.2/pkgdb
basicwebsite-0.0.0
我遇到了这个确切的错误,并尝试删除项目并重新生成它,但没有成功。然而,一旦我升级了堆栈,它就完美地工作了:
$ stack upgrade
Current Stack version: 1.3.2, available download version: 1.4.0
Newer version detected, downloading
...
$ stack exec -- yesod devel
...
ExitSuccess
Type help for available commands. Press enter to force a rebuild.
Starting devel application
Devel application launched: http://localhost:3000