Comments (1)
I haven't tried the previous versions, but I do get the same errors when importing multiple Elm files into the same entry .js
file for version 8. Here's a example:
import { Elm as Elm1 } from './Module1.elm';
import { Elm as Elm2 } from './Module2.elm';
window.addEventListener('load', () => {
const node1 = document.getElementById('id1');
Elm1.Module1.init({ node: node1 });
const node2 = document.getElementById('id2');
Elm2.Module2.init({ node: node2 });
})
Here's the output (I'm using yarn):
➤ YN0000: +-------------------------------------------------------------------------------
➤ YN0000: | Corrupt File: /Users/runner/work/<path/to/elm-stuff>/0.19.1/o.dat
➤ YN0000: | Byte Offset: 593610
➤ YN0000: | Message: not enough bytes
➤ YN0000: |
➤ YN0000: | Please report this to https://github.com/elm/compiler/issues
➤ YN0000: | Trying to continue anyway.
➤ YN0000: +-------------------------------------------------------------------------------
➤ YN0000:
➤ YN0000: -- CORRUPT CACHE ---------------------------------------------------------------
➤ YN0000:
➤ YN0000: It looks like some of the information cached in elm-stuff/ has been corrupted.
➤ YN0000:
➤ YN0000: Try deleting your elm-stuff/ directory to get unstuck.
Not sure if you have the same setup since I would assume importing two Elm modules is fairly uncommon, but my project required it nonetheless. Since this was a race condition for me, it only happened occasionally, and only on Github Actions (it seems to work fine on my own computer).
I looked around and saw that there was already a solution on Elm's Snowpack plugin that uses locks to guarantee sequential compilation. Looking at the code, I would assume it wouldn't be too difficult to implement here, if the library authors wanted.
from elm-webpack-loader.
Related Issues (20)
- Peer dependency issue for elm 0.19.1-1 HOT 8
- Path with a space fails compilation
- The old version of yargs being used in the dependencies has vulnerabilities
- Replacing strings in generated output
- Version 7.0.1/8.0.0 can cause memory problems on Windows HOT 1
- Version 7.01 doesn't observe source code changes anymore HOT 14
- `npm install --save elm-webpack-loader` fails HOT 1
- Webpack 5 error in the browser HOT 1
- This loader should not expect `--watch` for the dev server HOT 9
- Error: Cannot find module 'temp'
- Do not see elm compiler erros in browser console anymore HOT 2
- Problem with the NPM package - 403 Forbidden from dl.bintray.com HOT 1
- elm-webpack-loader appears to be trying to use file without main as an entrypoint HOT 3
- 8.0.0 compiles all the Elm files on a single file change HOT 4
- Usage with webpack5's new `cache.type = 'filesystem'` seems broken across builds.
- Elm errors don’t show up on overlay anymore HOT 1
- Facilitate applying patches
- CVE-2022-37601 (update loader-utils to v3)
- quick usage help question - `Compiler process exited with error Compilation failed` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elm-webpack-loader.