SparkPost / heml

HEML is an open source markup language for building responsive email.
https://heml.io
MIT License
4.33k stars 157 forks source link

Cannot find module './Button' #45

Closed obfuscatedgeek closed 6 years ago

obfuscatedgeek commented 6 years ago

I am getting this error since today

Error: Cannot find module './Button'
           at Function.Module._resolveFilename (module.js:536:15)
           at Function.Module._load (module.js:466:25)
           at Module.require (module.js:579:17)
           at require (internal/module.js:11:18)
           at Object.<anonymous> (/usr/src/app/node_modules/@heml/elements/build/index.js:68:15)
           at Module._compile (module.js:635:30)
           at Object.Module._extensions..js (module.js:646:10)
           at Module.load (module.js:554:32)
           at tryModuleLoad (module.js:497:12)
           at Function.Module._load (module.js:489:3)
           at Module.require (module.js:579:17)
           at require (internal/module.js:11:18)
           at Object.<anonymous> (/usr/src/app/node_modules/heml/build/index.js:126:17)
           at Module._compile (module.js:635:30)
           at Object.Module._extensions..js (module.js:646:10)
           at Module.load (module.js:554:32)

Was getting error on the previous version ^1.0.2-0. Upgraded to the new version today and still the same error, any clues ?

Thanks

avigoldman commented 6 years ago

Hey @obfuscatedgeek 👋 Would you mind giving some of your environment information. Node version and OS would be a good start.

obfuscatedgeek commented 6 years ago

Hi @avigoldman thanks for quick response.

It fails on my docker environment running NodeJS 8.1.0

avigoldman commented 6 years ago

Hmmm ok...what OS?

avigoldman commented 6 years ago

Looks like the button file is named button.js but it is being included as ./Button. Good chance that is the issue. Can you do an install from the button-case-issue branch, and see if it works properly?

obfuscatedgeek commented 6 years ago

Cool. Will check in an hour and update you.

obfuscatedgeek commented 6 years ago

OK back but no progress.

I am trying to install from the branch but npm keeps failing saying Missing package name :(

avigoldman commented 6 years ago

Whoops, my bad! I didn't think it through. Here are the steps to install from the repo.

git clone https://github.com/SparkPost/heml
cd heml
npm install && npm run bootstrap && npm run build

Then you should be able to run the CLI like so (from that directory) ./packages/heml/build/bin/heml.js build my-template.heml

obfuscatedgeek commented 6 years ago

Sweet! that works. Able to run from CLI

avigoldman commented 6 years ago

Awesome! I'll merge that in and push out a patch

avigoldman commented 6 years ago

You should be good to install 1.1.3! Let me know if you hit any other issues 😄

obfuscatedgeek commented 6 years ago

Awesome work mate! Works perfectly! Thank you very much