私のプロジェクトのニレ、package.jsonであるエルムは依存ここ
{
"version": "1.0.0",
"summary": "helpful summary of your project, less than 80 characters",
"repository": "https://github.com/user/project.git",
"license": "BSD3",
"source-directories": [
"."
],
"exposed-modules": [],
"dependencies": {
"elm-lang/core": "5.1.1 <= v < 6.0.0",
"elm-lang/html": "2.0.0 <= v < 3.0.0",
"simonh1000/elm-charts": "3.1.0 <= v < 4.0.0"
},
"elm-version": "0.18.0 <= v < 0.19.0"
}
elm-charts
がChart
と呼ばれるモジュールをエクスポートしているモジュールを見つけることができません。
Chart
module Components.ChartView exposing (..)
import Chart as C exposing (..)
import Html exposing (Html, div)
import Html.Attributes exposing (id, class)
をインポートしたいが、ニレをコンパイルしようとすると、私はエラーを取得する私のChartView.elm
で
:
I cannot find module 'Chart'.
Module 'Components.ChartView' is trying to import it.
Potential problems could be: * Misspelled the module name * Need
to add a source directory or new dependency to elm-package.json
私はプロジェクトディレクトリからのニレのREPLを開くと、私ができますインポートチャート:
[email protected]:~/elixir/eval$ elm repl
\> import Chart
\>
Elmはコンパイル時に 'Chart'を見つけることができません。
'ChartView.elm'はサブディレクトリにありますか、それとも' elm-package.json'の隣に座っていますか?あなたがGitリポジトリをリンクしてクローンして見せることが可能ですか? –
'elm-package install -y'を実行してライブラリをダウンロードしましたか? –
はい、elm-packageをインストールしました。プロジェクトのトップレベルディレクトリ – CHsurfer