Comments (4)
Ahhh, okay that makes a lot more sense! Thanks for clearing that up! đ
from mailbox.
First of all: thanks for reporting an issue :)
Unfortunately, I couldn't reproduce the problem, unless I specified a layout which doesn't exist. This led to the following error message:
$ mailbox build test
i Rendering MJML⌠08:19:27
C:\Users\fynn-\AppData\Local\Yarn\Data\global\node_modules\yargs\yargs.js:1148
else throw err
^
Error: ENOENT: no such file or directory, open 'src/layouts/test.mjml'
at Object.openSync (fs.js:451:3)
at Object.readFileSync (fs.js:351:35)
at renderMJML (C:\Users\fynn-\AppData\Local\Yarn\Data\global\node_modules\@mvsde\mailbox\lib\render-mjml.js:19:23)
at build (C:\Users\fynn-\AppData\Local\Yarn\Data\global\node_modules\@mvsde\mailbox\commands\build.js:15:18)
at Object.handler (C:\Users\fynn-\AppData\Local\Yarn\Data\global\node_modules\@mvsde\mailbox\bin\mailbox.js:34:33)
at Object.runCommand (C:\Users\fynn-\AppData\Local\Yarn\Data\global\node_modules\yargs\lib\command.js:238:44)
at Object.parseArgs [as _parseArgs] (C:\Users\fynn-\AppData\Local\Yarn\Data\global\node_modules\yargs\yargs.js:1063:30)
at Object.parse (C:\Users\fynn-\AppData\Local\Yarn\Data\global\node_modules\yargs\yargs.js:542:19)
at Object.<anonymous> (C:\Users\fynn-\AppData\Local\Yarn\Data\global\node_modules\@mvsde\mailbox\bin\mailbox.js:141:4)
at Module._compile (internal/modules/cjs/loader.js:722:30)
Is this the same message you got?
I discovered and fixed some problems with the readme file, mainly the wrong file extension for layouts (.json
instead of the correct .mjml
). Maybe this was related to your issue?
Thanks in advance for all information you can provide, so that I am able to understand the issue.
from mailbox.
That is the error I received, yes.
My repro steps are:
- Install globally with
yarn global add @mvsde/mailbox
mkdir example && cd example
in any working directorymailbox create example
mailbox build example
Running the build
command throws the following error:
/Users/colin/.config/yarn/global/node_modules/yargs/yargs.js:1148
else throw err
^
Error: ENOENT: no such file or directory, open 'src/layouts/example.mjml'
at Object.fs.openSync (fs.js:579:3)
at Object.fs.readFileSync (fs.js:485:33)
at renderMJML (/Users/colin/.config/yarn/global/node_modules/@mvsde/mailbox/lib/render-mjml.js:19:23)
at build (/Users/colin/.config/yarn/global/node_modules/@mvsde/mailbox/commands/build.js:15:18)
at Object.handler (/Users/colin/.config/yarn/global/node_modules/@mvsde/mailbox/bin/mailbox.js:34:33)
at Object.runCommand (/Users/colin/.config/yarn/global/node_modules/yargs/lib/command.js:238:44)
at Object.parseArgs [as _parseArgs] (/Users/colin/.config/yarn/global/node_modules/yargs/yargs.js:1063:30)
at Object.parse (/Users/colin/.config/yarn/global/node_modules/yargs/yargs.js:542:19)
at Object.<anonymous> (/Users/colin/.config/yarn/global/node_modules/@mvsde/mailbox/bin/mailbox.js:141:4)
at Module._compile (internal/modules/cjs/loader.js:702:30)
From what I've been able to see, there are two things at play here.
The path is incorrect and the root .mjml
file is not created with the same name as the project directory. The layout
option is not passed to the generateTemplatePath()
function, so it incorrectly attempts to build from /src/layouts/example.mjml
instead of example/src/layouts/default.mjml
Let me know if you're able to reproduce the same thing! đ Thanks!
Edit: Forgot to mention my environment details (I see you are testing on Windows). I'm using:
- MacOS Sierra
- Node v10.4.0
from mailbox.
Thank you for the steps! Now I know whats wrong: my documentation isn't clear enough :D
The command mailbox create example
creates a new folder in the current working directory called example
. The project is then placed within this new folder. If you want to place the project in the current directory, you can call mailbox create
or mailbox create .
.
And further on, I think the documentation isn't clear that you don't have to specify a layout for the commands dev
, build
and test
.
I already overhauled the readme file. I hope this resolves any issues.
Thanks again for bringing this up :)
from mailbox.
Related Issues (4)
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 mailbox.