Open OvermindDL1 opened 8 years ago
Hmm. What did you enter in the textbox? Was it relative to the location of elm-package.json
or an absolute path? This will be tough for me to debug as I don't have a Windows 10 machine :(
As a temporary workaround, you can manually add this in your elm-package.json
:
"linter-elm-make": {
"mainPaths": [
"Main.elm"
]
}
I left it as the default value that was already in the box (I had the tab open of one of the few main files), which was kind of like: web\elm\SomethingApp.elm
It did however add this itself to elm-package.json:
"linter-elm-make": {
"mainPaths": [
"web\\elm\\SomethingApp.elm"
]
}
And yeah I am not a fan on this Win10 stuff, so many performance issues on it that my linux desktop at home just does not have, and this hardware is a lot more beefy than mine as well... >.>
It's escaping the backslashes on save so "web\\elm\\SomethingApp.elm"
is just fine.
I could not reproduce this on a Windows 7 machine :( Can you give me an idea on how your directory is structured? Like where is your elm-package.json
relative to web\elm\SomethingApp.elm
?
Or, even better if you can insert a console.log
here (below line 98) so that we'll know the value of projectDirectory
:
this.setMainPathsView.onDidConfirm(({projectDirectory, mainPaths}) => {
const jsonFilePath = path.join(projectDirectory, 'elm-package.json');
let json = fs.readJsonSync(jsonFilePath, {throws: false});
Thanks!
Certainly, can do!
The structure is:
.
./brunch-config.js
./package.json
./elm-package.json
./elm-stuff
./web/elm/MyApp.elm
I added a console.log("projectDirectory", projectDirectory)
at line 99 (pushing line 99 to 100), restarted Atom, ran Set Main path, left it at "web/elm/MyApp.elm", same error occurred, and it printed this:
linter-elm-make.js:99 projectDirectory C:\Users\robertsong\Projects\ccc_server
linter-elm-make.js:99 projectDirectory undefined
There were none before, the two appeared with that run, so it ran it twice, hence why it saved the first time but not the next, unsure why running twice. Anything else I can check for you? :-)
As far as I can recall, it's linting twice the first time because the text in the buffer changed (when it was loaded from file) and linter-elm-make is always forcing a lint whenever a buffer gets focused (when Lint On The Fly
is enabled).
As for why it's undefined
the 2nd lint, I have no idea right now :confused:
Can you try 0.13.2 and wait for the "Copied project files to work directory" notification to appear?
Thanks!
Never did, got a message at the bottom of:
elm-make.exe: elm-lang-html-66b1583: MoveFileEx "elm-lang-html-66b1583" "elm-lang\\html\\1.1.0": permission denied (Access is denied.)at line 1 col 1 in web\elm\MessengerApp.elm
Linter Elm Make: Set Main Paths
, then select the path (I just put in one of the files for now for testing), got this:Atom Version: 1.8.0 System: Microsoft Windows 10 Pro Thrown From: linter-elm-make package, v0.12.2
Stack Trace
Uncaught TypeError: Path must be a string. Received undefined
Commands
Config
Installed Packages