-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors when launching project #16
Comments
Hi @easyvico, If you want to run You need to do Maybe it would be easier if you could describe your use case, what are you trying to achieve. Cheers |
Hi @mastertheblaster |
Hi @easyvico, This project is meant to be run on a server side.
I hope it would help you and other developers to easily bootstrap a new project. Cheers |
Hi @mastertheblaster, |
Hi @easyvico Here you are https://github.com/wix-incubator/mjml-react-example Cheers |
Closing for now, please feel free to reopen if needed |
Hi Mantas Miliukas,
Sorry I am a bit busy actually, I’ll let you know as soon as it will be possible if it is ok…
Thank you very much for your help
Le 31 janv. 2019 à 09:33, Mantas Miliukas <[email protected]<mailto:[email protected]>> a écrit :
Hi @easyvico<https://github.com/easyvico>
Here you are https://github.com/wix-incubator/mjml-react-example
Let me know if this helps you.
Cheers
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#16 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Acx-U-zTjPkV1YjBy2Aus_mkW-mevUvMks5vIqpRgaJpZM4aX0dU>.
|
Hello, i tested it and it works well, but i was wondering where is the html generated ? |
Hi @easyvico, The code is being run on a server. It's generated by node express lib (at runtime). It can also be configured/developed as a shell script. What's your usecase? This is the code https://github.com/wix-incubator/mjml-react-example/blob/master/src/email.js#L15 which is being invoked when you open a browser and use http://localhost:3000 url. Regards, |
Hi Mantas, i would like to get the html file generated because i want to test the email before sending to the customers... email.js but it doesn't work. Here an example
Regards
|
Hi @easyvico, I have updated the example project so you could run it from command line. So now you can change the components and do like:
Regarding the example you gave, there is one mistake here. const Header = () => ([
<MjmlSection key="first" padding='10px 0px'>
<MjmlColumn>
<MjmlText font-size='12px' color='grey' align='center'>
Si cet email ne s'affiche pas correctement, vous pouvez le visualiser grâce á ce
<a href='http://www.maif.fr' style={{color: 'pink'}}> lien</a>
</MjmlText>
</MjmlColumn>
</MjmlSection>,
<MjmlSection key="second" padding='10px 0px' backgroundColor="#ede9e2">
<MjmlColumn>
<MjmlImage src='http://fakeimg.pl/60x60/' alt='logo' width={60} />
</MjmlColumn>
</MjmlSection>
]); The key changes are:
And now you can automate things:
Cheers |
Hi @mastertheblaster
thank you for reply and help, it worked with the array but i have errors when compile; here a screen and errors :
events.js:174
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE: address already in use :::3000
at Server.setupListenHandle [as _listen2] (net.js:1270:14)
at listenInCluster (net.js:1318:12)
at Server.listen (net.js:1405:7)
at Function.listen (/Users/laurentvicherd/Documents/mjml-react-example/node_modules/express/lib/application.js:618:24)
at Object.<anonymous> (/Users/laurentvicherd/Documents/mjml-react-example/dist/server.js:21:5)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
Emitted 'error' event at:
at emitErrorNT (net.js:1297:8)
at process._tickCallback (internal/process/next_tick.js:63:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:757:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
[nodemon] app crashed - waiting for file changes before starting...
[nodemon] restarting due to changes...
[nodemon] starting `node ./dist/server.js`
Listening on port 3000!
Do you know what would be the issue ?
regards
…________________________________
De : Mantas Miliukas <[email protected]>
Envoyé : lundi 1 avril 2019 07:12
À : wix-incubator/mjml-react
Cc : easyvico; Mention
Objet : Re: [wix-incubator/mjml-react] Errors when launching project (#16)
Hi @easyvico<https://github.com/easyvico>,
I have updated the example project so you could run it from command line.
https://github.com/wix-incubator/mjml-react-example#running-from-command-line
So now you can change the components and do like:
npm run build
npm run generate
Regarding the example you gave, there is one mistake here.
MJML parser expects a correct structure of tags, so if you would change your Header.js file to smth like:
const Header = () => ([
<MjmlSection key="first" padding='10px 0px'>
<MjmlColumn>
<MjmlText font-size='12px' color='grey' align='center'>
Si cet email ne s'affiche pas correctement, vous pouvez le visualiser grâce á ce
<a href='http://www.maif.fr' style={{color: 'pink'}}> lien</a>
</MjmlText>
</MjmlColumn>
</MjmlSection>,
<MjmlSection key="second" padding='10px 0px' backgroundColor="#ede9e2">
<MjmlColumn>
<MjmlImage src='http://fakeimg.pl/60x60/' alt='logo' width={60} />
</MjmlColumn>
</MjmlSection>
]);
The key changes are:
* remove div element
* return an array
* give a unique key attribute for each section in a result array
And now you can automate things:
npm run build
npm run generate | <execute some other app which will receive the HTML>
Cheers
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#16 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Acx-U-tW8FzEVN1Okpbh62QrTXko8ms0ks5vcbFpgaJpZM4aX0dU>.
|
Hi, Ok, seems there is a process running in a background. Regards, |
Hello,
Nice it was the problem of the process running in background...thx a lot, i'll now be able (i hope) to make a template.
May i put it on a new branch on github ?
regards
Laurent
…________________________________
De : Mantas Miliukas <[email protected]>
Envoyé : mardi 2 avril 2019 07:02
À : wix-incubator/mjml-react
Cc : easyvico; Mention
Objet : Re: [wix-incubator/mjml-react] Errors when launching project (#16)
Hi,
Ok, seems there is a process running in a background.
Maybe the app crashed and didn't exit clean so
you can use killall -9 node command, to kill any previous instances of app.
Regards,
Mantas
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#16 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Acx-Uwk0CshUbmVThymYTaAH-2qYTs4Mks5vcwCTgaJpZM4aX0dU>.
|
Hi @easyvico, You can https://help.github.com/en/articles/fork-a-repo Regards, |
thank you for the device, i'll check this ! ^^
regards,
Laurent
<http://pics.imagup.com/04/1254811550_logo.png>??
…________________________________
De : Mantas Miliukas <[email protected]>
Envoyé : mardi 2 avril 2019 10:57
À : wix-incubator/mjml-react
Cc : easyvico; Mention
Objet : Re: [wix-incubator/mjml-react] Errors when launching project (#16)
Hi @easyvico<https://github.com/easyvico>,
You can clone/fork the repo and do whatever you like :) It's up to you.
I guess the branch is not required, you can maintain your own fork and push code there.
https://help.github.com/en/articles/fork-a-repo
Regards,
Mantas
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#16 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Acx-UxE7cppG0Hd-zh3DLzgA4CC4_j4tks5vczeagaJpZM4aX0dU>.
|
Hi Mantas,
I tried to put a cssClass in MjmlColumn with a variable but it doesn't work (see the screenshots) i just have a [object object] class when i inspect in the browser...any idea how to resolve it ?
Thank you very much ^^
regards
Laurent
…________________________________
De : Mantas Miliukas <[email protected]>
Envoyé : mardi 2 avril 2019 10:57
À : wix-incubator/mjml-react
Cc : easyvico; Mention
Objet : Re: [wix-incubator/mjml-react] Errors when launching project (#16)
Hi @easyvico<https://github.com/easyvico>,
You can clone/fork the repo and do whatever you like :) It's up to you.
I guess the branch is not required, you can maintain your own fork and push code there.
https://help.github.com/en/articles/fork-a-repo
Regards,
Mantas
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#16 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Acx-UxE7cppG0Hd-zh3DLzgA4CC4_j4tks5vczeagaJpZM4aX0dU>.
|
Hi, Sorry but i am not able to see your screenshot. In any case, i guess your code looks like: <MjmlColumn cssClass={variable}>...</MjmlColumn> If so, then make sure your variable is a string. According to your problem description, Regards, |
Ok thank you , so i put as a string but the class take the name of what i put in the string but not the name 'columnStyle' as a class...like this :
const columnStyle = '5px solid pink';
export const Header = (props) => ([
<MjmlSection key="first" padding='10px 0px'>
<MjmlColumn cssClass={columnStyle}>
…________________________________
De : Mantas Miliukas <[email protected]>
Envoyé : jeudi 4 avril 2019 11:41
À : wix-incubator/mjml-react
Cc : easyvico; Mention
Objet : Re: [wix-incubator/mjml-react] Errors when launching project (#16)
Hi,
Sorry but i am not able to see your screenshot. In any case, i guess your code looks like:
<MjmlColumn cssClass={variable}>...</MjmlColumn>
If so, then make sure your variable is a string. According to your problem description, variable in your code is an object.
Regards,
Mantas
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#16 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Acx-U-aelMw5PeH4cNfWcA2SQZ_HI1ZUks5vdeTOgaJpZM4aX0dU>.
|
Maybe the solution would be to pass by the MjmlStyle component but i don't know how to implement and use it as it's shown in the mjml doc because the class text inside doesn't work in react.
https://mjml.io/documentation/#mjml-style
Documentation for MJML - The Responsive Email Framework<https://mjml.io/documentation/#mjml-style>
MJML Guides. MJML is a markup language designed to reduce the pain of coding a responsive email. Its semantic syntax makes it easy and straightforward and its rich standard components library speeds up your development time and lightens your email codebase.
mjml.io
…________________________________
De : Mantas Miliukas <[email protected]>
Envoyé : jeudi 4 avril 2019 11:41
À : wix-incubator/mjml-react
Cc : easyvico; Mention
Objet : Re: [wix-incubator/mjml-react] Errors when launching project (#16)
Hi,
Sorry but i am not able to see your screenshot. In any case, i guess your code looks like:
<MjmlColumn cssClass={variable}>...</MjmlColumn>
If so, then make sure your variable is a string. According to your problem description, variable in your code is an object.
Regards,
Mantas
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#16 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Acx-U-aelMw5PeH4cNfWcA2SQZ_HI1ZUks5vdeTOgaJpZM4aX0dU>.
|
Hi @easyvico , I have extended the example project on how to use class names and styles. Cheers |
Hi Mantas,
Thank you very much , i did that yesterday but i didn't put
the backtick<http://abulletproofidea.com/questions/1910/a-quoi-sert-le-symbole-backtick-en-javascript.html>
(`)<http://abulletproofidea.com/questions/1910/a-quoi-sert-le-symbole-backtick-en-javascript.html> 😉<http://abulletproofidea.com/questions/1910/a-quoi-sert-le-symbole-backtick-en-javascript.html><http://abulletproofidea.com/questions/1910/a-quoi-sert-le-symbole-backtick-en-javascript.html>
You used 2 examples, one with <MjmlStyle> and the other with <MjmlStyle inline> but what is the difference ?
I don't see something different on the screen. Is it better to put one more than the other ?
regards,
Laurent
…________________________________
De : Mantas Miliukas <[email protected]>
Envoyé : vendredi 5 avril 2019 07:12
À : wix-incubator/mjml-react
Cc : easyvico; Mention
Objet : Re: [wix-incubator/mjml-react] Errors when launching project (#16)
Hi @easyvico<https://github.com/easyvico> ,
I have extended the example project on how to use class names and styles.
Give it a try: wix-incubator/mjml-react-example@90f32d1<wix-incubator/mjml-react-example@90f32d1>
Cheers
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#16 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Acx-U9CsNo9ptt_ilLfSwXZE4QLm2VBkks5vdvdggaJpZM4aX0dU>.
|
Hi @easyvico , Inline example using a pseudo code: <MjmlStyle inline>.blue { color: blue; }</MjmlStyle>
<MjmlSection cssClass="blue"/> will generate smth like: <div class="blue" style="color:blue;"></div> And <MjmlStyle>.blue { color: blue; }</MjmlStyle>
<MjmlSection cssClass="blue"/> It will look smth like: <style>.blue { color: blue; }</style>
<div class="blue"></div> This property tells if CSS class properties should be injected inside the referenced element or not. You won't see a difference in a browser, but you might see a difference based on mail client. Personally I would always use Regards, |
Thank you for the details, so the class isn't really useful in the inline case because you already have the style inside the <div>
<div class="blue" style="color:blue;"></div>
regards
…________________________________
De : Mantas Miliukas <[email protected]>
Envoyé : vendredi 5 avril 2019 13:43
À : wix-incubator/mjml-react
Cc : easyvico; Mention
Objet : Re: [wix-incubator/mjml-react] Errors when launching project (#16)
Hi @easyvico<https://github.com/easyvico> ,
Inline example using a pseudo code:
<MjmlStyle inline>.blue { color: blue; }</MjmlStyle>
<MjmlSection cssClass="blue"/>
will generate smth like:
<div class="blue" style="color:blue;"></div>
And without inline property:
<MjmlStyle>.blue { color: blue; }</MjmlStyle>
<MjmlSection cssClass="blue"/>
It will look smth like:
<style>.blue { color: blue; }</style>
<div class="blue"></div>
This property tells if CSS class properties should be injected inside the referenced element or not. You won't see a difference in a browser, but you might see a difference based on mail client. Personally I would always use inline property as it's more safe.
Regards,
Mantas
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#16 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Acx-U1yxkfxhjcQEKYh5JQGWkjaAAIQsks5vd1MbgaJpZM4aX0dU>.
|
Hmm, not sure i got you correctly, but i guess you misunderstood my examples. const fs = require('fs');
<MjmlStyle inline>{fs.readFileSync('./my-classes.css')}</MjmlStyle>
<MjmlSection cssClass="some-name-from-my-classes-css-file">...</MjmlSection> This will make sure that all CSS properties inside your Regards, |
Ok thats sound clear for me now, you definitely havé good xp in dev ans React js 👍🏽
Cheers
Envoyé de mon iPhone
Le 5 avr. 2019 à 19:21, Mantas Miliukas <[email protected]<mailto:[email protected]>> a écrit :
Hmm, not sure i got you correctly, but i guess you misunderstood my examples.
Consider the following example:
const fs = require('fs');
<MjmlStyle inline>{fs.readFileSync('./my-classes.css')}</MjmlStyle>
<MjmlSection cssClass="some-name-from-my-classes-css-file">...</MjmlSection>
This will make sure that all CSS properties inside your my-classes.css will be inlined inside MjmlSection.
Regards,
Mantas
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#16 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Acx-U_E4LsT_wYW886fODBYrr4QNyP9Yks5vd4YIgaJpZM4aX0dU>.
|
Hello,
I tried to test with your example below and put a .css file apart but it doesn't work, i don't understand because my css file is in the same directory of my email.js file. Any idea ? thank you ^^
const fs = require('fs');
<MjmlStyle inline>{fs.readFileSync('./my-classes.css')}</MjmlStyle>
<MjmlSection cssClass="some-name-from-my-classes-css-file">...</MjmlSection>
Error: ENOENT: no such file or directory, open './my-classes.css'
at Object.openSync (fs.js:438:3)
at Object.readFileSync (fs.js:343:35)
at generate (/Users/laurentvicherd/Documents/mjml-react-example/dist/email.js:36:9)
…________________________________
De : Mantas Miliukas <[email protected]>
Envoyé : vendredi 5 avril 2019 17:21
À : wix-incubator/mjml-react
Cc : easyvico; Mention
Objet : Re: [wix-incubator/mjml-react] Errors when launching project (#16)
Hmm, not sure i got you correctly, but i guess you misunderstood my examples.
Consider the following example:
const fs = require('fs');
<MjmlStyle inline>{fs.readFileSync('./my-classes.css')}</MjmlStyle>
<MjmlSection cssClass="some-name-from-my-classes-css-file">...</MjmlSection>
This will make sure that all CSS properties inside your my-classes.css will be inlined inside MjmlSection.
Regards,
Mantas
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#16 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Acx-U_E4LsT_wYW886fODBYrr4QNyP9Yks5vd4YIgaJpZM4aX0dU>.
|
Hi, In
And you are good to go. Regards, |
Hi Mantas,
I still have the error :
[nodemon] starting `node ./dist/server.js`
fs.js:114
throw err;
^
Error: ENOENT: no such file or directory, open './assets/styles.css'
at Object.openSync (fs.js:438:3)
at readFileSync (fs.js:343:35)
Here a screen i join too
regards,
Laurent
…________________________________
De : Mantas Miliukas <[email protected]>
Envoyé : mardi 9 avril 2019 13:56
À : wix-incubator/mjml-react
Cc : easyvico; Mention
Objet : Re: [wix-incubator/mjml-react] Errors when launching project (#16)
Hi,
In node relative paths are being resolved from a base directory where you launched the main application. As you see in your example it tries to look for a file relative to ./dist folder. The easiest solution for testing purposes is todo like: wix-incubator/mjml-react-example@4ea2e0a<wix-incubator/mjml-react-example@4ea2e0a>
1. Create ./assets folder, put all your css there.
2. Inside your code write like readFileSync('./assets/file.css')
And you are good to go.
Regards,
Mantas
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#16 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Acx-U6nNqlVoNM0RF11sPN6BnZ9vh1hwks5vfJv0gaJpZM4aX0dU>.
|
I found where was my error when i saw your repo, the assets folder was not at the root but in the src folder, now it works ! The template will be ready soon ^^
cheers
Laurent
…________________________________
De : Mantas Miliukas <[email protected]>
Envoyé : mardi 9 avril 2019 13:56
À : wix-incubator/mjml-react
Cc : easyvico; Mention
Objet : Re: [wix-incubator/mjml-react] Errors when launching project (#16)
Hi,
In node relative paths are being resolved from a base directory where you launched the main application. As you see in your example it tries to look for a file relative to ./dist folder. The easiest solution for testing purposes is todo like: wix-incubator/mjml-react-example@4ea2e0a<wix-incubator/mjml-react-example@4ea2e0a>
1. Create ./assets folder, put all your css there.
2. Inside your code write like readFileSync('./assets/file.css')
And you are good to go.
Regards,
Mantas
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#16 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Acx-U6nNqlVoNM0RF11sPN6BnZ9vh1hwks5vfJv0gaJpZM4aX0dU>.
|
Hello,
I created a 'template' folder in src where i put my new email inside (gabarit1.html) and add a link on the email.js
<a href='./templates/gabarit1.html'>link</a> but i don't see my new email. When i click on it, nothing happen but the new url is visible in the browser --> http://localhost:3000/templates/gabarit1.html.
Do you know what is the problem ?
regards
Laurent
…________________________________
De : Mantas Miliukas <[email protected]>
Envoyé : mardi 9 avril 2019 13:56
À : wix-incubator/mjml-react
Cc : easyvico; Mention
Objet : Re: [wix-incubator/mjml-react] Errors when launching project (#16)
Hi,
In node relative paths are being resolved from a base directory where you launched the main application. As you see in your example it tries to look for a file relative to ./dist folder. The easiest solution for testing purposes is todo like: wix-incubator/mjml-react-example@4ea2e0a<wix-incubator/mjml-react-example@4ea2e0a>
1. Create ./assets folder, put all your css there.
2. Inside your code write like readFileSync('./assets/file.css')
And you are good to go.
Regards,
Mantas
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#16 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Acx-U6nNqlVoNM0RF11sPN6BnZ9vh1hwks5vfJv0gaJpZM4aX0dU>.
|
Hi Mantas,
Sorry to bother you again, but do you know how i could stock other emails in a new folder (ex: templates/email1, email2...) and get a link on the home email page to see them ?
The only way i found to see my new email is to change: var_email = require("./email") with var_email = require("./templates/email1") in server.js but i think there would be a better way to do this.
thank you for your help
Laurent
|
Hi @easyvico , I guess you have forked the repo. If so, push all the code to it and give me the link to check. Cheers, |
here you'll see the code i push 5 minutes ago
easyvico/mjml-react-example@d4fdee0
[https://avatars2.githubusercontent.com/u/30178899?s=200&v=4]<https://github.com/easyvico/mjml-react-example/commit/d4fdee08cfef690df04962f17e3b02b842095d14>
template email1 + link + components · easyvico/mjml-react-example@d4fdee0<easyvico/mjml-react-example@d4fdee0>
mjml-react example project. Contribute to easyvico/mjml-react-example development by creating an account on GitHub.
github.com
cheers
…________________________________
De : Mantas Miliukas <[email protected]>
Envoyé : jeudi 11 avril 2019 12:31
À : wix-incubator/mjml-react
Cc : easyvico; Mention
Objet : Re: [wix-incubator/mjml-react] Errors when launching project (#16)
Hi @easyvico<https://github.com/easyvico> ,
I guess you have forked the repo. If so, push all the code to it and give me the link to check.
Cause it's complicated to advice smth without seeing an actual code.
Cheers,
Mantas
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#16 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Acx-UznqZy1cIYClnuuHRb39pnzzJs3rks5vfysHgaJpZM4aX0dU>.
|
Hi @easyvico , I have improved the example project, you can take a look here: However keep in mind - this navigation will work only in your local computer, for demo purposes mostly. But in real live once you send this email, the link will not work, cause it's the nature of email. Regards, |
Hi Mantas,
Thank you so much it works very well !
The only purpose is to put links of each templates on the first page and be able to see them easily in local and of course not to make navigation between emails once it is sent...
I will continue to make templates, if you want them in the main repo i can "pull request" once it'll be finished.
regards
Laurent
<http://pics.imagup.com/04/1254811550_logo.png>??
…________________________________
De : Mantas Miliukas <[email protected]>
Envoyé : mardi 16 avril 2019 07:02
À : wix-incubator/mjml-react
Cc : easyvico; Mention
Objet : Re: [wix-incubator/mjml-react] Errors when launching project (#16)
Hi @easyvico<https://github.com/easyvico> ,
I have improved the example project, you can take a look here:
wix-incubator/mjml-react-example@ceb1910<wix-incubator/mjml-react-example@ceb1910>
However keep in mind - this navigation will work only in your local computer, for demo purposes mostly. But in real live once you send this email, the link will not work, cause it's the nature of email.
Regards,
Mantas
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#16 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Acx-U70FIrQEwKQJW2J7ap0bXXRXWDmSks5vhXWXgaJpZM4aX0dU>.
|
Hi @MasterBlaster,
I tried to use storybook (a user interface development environment and playground for UI components) in the mjml project.
The install is ok, i can launch storybook without problem and see the interface with the components examples.
But when i create my own stories in index.stories.js for my Header component and relaunch storybook (npm run storybook) it crash with the message below.
I put the repo with a branch stroyrbook-test here : https://github.com/easyvico/mjml-react-example/tree/storybook-test
[https://avatars0.githubusercontent.com/u/30178899?s=400&v=4]<https://github.com/easyvico/mjml-react-example/tree/storybook-test>
easyvico/mjml-react-example<https://github.com/easyvico/mjml-react-example/tree/storybook-test>
mjml-react example project. Contribute to easyvico/mjml-react-example development by creating an account on GitHub.
github.com
Do you have an idea how to resolve the issue ?
thank you
easyvico
ERROR in ./node_modules/clean-css/lib/reader/read-sources.js
Module not found: Error: Can't resolve 'fs' in '/Users/laurentvicherd/Documents/React/mjml-react-story/node_modules/clean-css/lib/reader'
@ ./node_modules/clean-css/lib/reader/read-sources.js 1:9-22
@ ./node_modules/clean-css/lib/clean.js
@ ./node_modules/clean-css/index.js
@ ./node_modules/html-minifier/src/htmlminifier.js
@ ./node_modules/mjml-core/lib/index.js
@ ./node_modules/mjml/lib/index.js
@ ./node_modules/mjml-react/dist/es/src/index.js
@ ./dist/components/Header.js
@ ./stories/index.stories.js
@ ./stories sync .stories.js$
@ ./.storybook/config.js
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/config.js (webpack)-hot-middleware/client.js?reload=true
ERROR in ./node_modules/clean-css/lib/reader/apply-source-maps.js
Module not found: Error: Can't resolve 'fs' in '/Users/laurentvicherd/Documents/React/mjml-react-story/node_modules/clean-css/lib/reader'
@ ./node_modules/clean-css/lib/reader/apply-source-maps.js 1:9-22
@ ./node_modules/clean-css/lib/reader/read-sources.js
@ ./node_modules/clean-css/lib/clean.js
@ ./node_modules/clean-css/index.js
@ ./node_modules/html-minifier/src/htmlminifier.js
@ ./node_modules/mjml-core/lib/index.js
@ ./node_modules/mjml/lib/index.js
@ ./node_modules/mjml-react/dist/es/src/index.js
@ ./dist/components/Header.js
@ ./stories/index.stories.js
@ ./stories sync .stories.js$
@ ./.storybook/config.js
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/config.js (webpack)-hot-middleware/client.js?reload=true
ERROR in ./node_modules/clean-css/lib/reader/load-original-sources.js
Module not found: Error: Can't resolve 'fs' in '/Users/laurentvicherd/Documents/React/mjml-react-story/node_modules/clean-css/lib/reader'
@ ./node_modules/clean-css/lib/reader/load-original-sources.js 1:9-22
@ ./node_modules/clean-css/lib/reader/read-sources.js
@ ./node_modules/clean-css/lib/clean.js
@ ./node_modules/clean-css/index.js
@ ./node_modules/html-minifier/src/htmlminifier.js
@ ./node_modules/mjml-core/lib/index.js
@ ./node_modules/mjml/lib/index.js
@ ./node_modules/mjml-react/dist/es/src/index.js
@ ./dist/components/Header.js
@ ./stories/index.stories.js
@ ./stories sync .stories.js$
@ ./.storybook/config.js
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/config.js (webpack)-hot-middleware/client.js?reload=true
ERROR in ./node_modules/mjml-core/lib/helpers/mjmlconfig.js
Module not found: Error: Can't resolve 'fs' in '/Users/laurentvicherd/Documents/React/mjml-react-story/node_modules/mjml-core/lib/helpers'
@ ./node_modules/mjml-core/lib/helpers/mjmlconfig.js 20:10-23
@ ./node_modules/mjml-core/lib/index.js
@ ./node_modules/mjml/lib/index.js
@ ./node_modules/mjml-react/dist/es/src/index.js
@ ./dist/components/Header.js
@ ./stories/index.stories.js
@ ./stories sync .stories.js$
@ ./.storybook/config.js
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/config.js (webpack)-hot-middleware/client.js?reload=true
ERROR in ./node_modules/mjml-parser-xml/lib/index.js
Module not found: Error: Can't resolve 'fs' in '/Users/laurentvicherd/Documents/React/mjml-react-story/node_modules/mjml-parser-xml/lib'
@ ./node_modules/mjml-parser-xml/lib/index.js 37:10-23
@ ./node_modules/mjml-core/lib/index.js
@ ./node_modules/mjml/lib/index.js
@ ./node_modules/mjml-react/dist/es/src/index.js
@ ./dist/components/Header.js
@ ./stories/index.stories.js
@ ./stories sync .stories.js$
@ ./.storybook/config.js
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/config.js (webpack)-hot-middleware/client.js?reload=true
ERROR in ./node_modules/uglify-js/tools/node.js
Module not found: Error: Can't resolve 'fs' in '/Users/laurentvicherd/Documents/React/mjml-react-story/node_modules/uglify-js/tools'
@ ./node_modules/uglify-js/tools/node.js 1:9-22
@ ./node_modules/html-minifier/src/htmlminifier.js
@ ./node_modules/mjml-core/lib/index.js
@ ./node_modules/mjml/lib/index.js
@ ./node_modules/mjml-react/dist/es/src/index.js
@ ./dist/components/Header.js
@ ./stories/index.stories.js
@ ./stories sync .stories.js$
@ ./.storybook/config.js
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/config.js (webpack)-hot-middleware/client.js?reload=true
…________________________________
De : Mantas Miliukas <[email protected]>
Envoyé : mardi 16 avril 2019 07:02
À : wix-incubator/mjml-react
Cc : easyvico; Mention
Objet : Re: [wix-incubator/mjml-react] Errors when launching project (#16)
Hi @easyvico<https://github.com/easyvico> ,
I have improved the example project, you can take a look here:
wix-incubator/mjml-react-example@ceb1910<wix-incubator/mjml-react-example@ceb1910>
However keep in mind - this navigation will work only in your local computer, for demo purposes mostly. But in real live once you send this email, the link will not work, cause it's the nature of email.
Regards,
Mantas
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#16 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Acx-U70FIrQEwKQJW2J7ap0bXXRXWDmSks5vhXWXgaJpZM4aX0dU>.
|
@easyvico storybookjs/storybook#4082 (comment). It should solve the |
Hi all,
When i try to install npm install react react-dom mjml mjml-react i get this message errors:
npm ERR! code ENOSELF
npm ERR! Refusing to install package with name "mjml-react" under a package
npm ERR! also called "mjml-react". Did you name your project the same
npm ERR! as the dependency you're installing?
npm ERR!
npm ERR! For more information, see:
npm ERR! https://docs.npmjs.com/cli/install#limitations-of-npms-install-algorithm
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/laurent/.npm/_logs/2019-01-29T10_59_28_382Z-debug.log
Here the debug log :
https://files.slack.com/files-pri/TF8BRFZS8-FFRSVSVGS/download/2019-01-29t10_59_28_382z-debug.log
So i did npm install instead and the install finished well, but when i launch the npm run start i get this message errors (see image below)
https://files.slack.com/files-pri/TF8BRFZS8-FFRPGHG2X/image.png
Any idea how to resolve this ? thank you for your help ;)
The text was updated successfully, but these errors were encountered: