antwarjs / antwar

A static site generator built with React and Webpack.
https://antwar.js.org/
MIT License
460 stars 35 forks source link

Can't get started on OS X 10.10 #98

Closed sergeylukin closed 8 years ago

sergeylukin commented 8 years ago

Hi,

I'm eager to getting my hands dirty with antwar, however I faced some issues before I could even start working on a new project.

As described in Getting started guide I installed antwar-cli globally and after executing antwar --init project I was getting error related to antwar peerDependency. I've then executed npm i antwar -g hoping to fix that and indeed didn't see that error again. However, that was still confusing. Did I do something wrong?

When trying again antwar --init project inside my ~/code directory I got this error:

{ [Error: Cannot find module '/Users/sergey/code/antwar.config.js'] code: 'MODULE_NOT_FOUND' }

While that error was confusing, antwar did create an project folder with some files and so I proceeded with cd project and antwar --develop and got this output:

Start developing

/Users/sergey/code/project/.antwar/build/bundleStaticPage.js:21636
              return __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"./SectionIndex.coffee\""); e.code = 'MODULE_NOT_FOUND'; throw e; }()));
                                                                                                                                                                             ^

Error: Cannot find module "./SectionIndex.coffee"
    at webpackMissingModule (/Users/sergey/code/project/.antwar/build/bundleStaticPage.js:21636:79)
    at Object.module.exports.handlers.sectionIndex (/Users/sergey/code/project/.antwar/build/bundleStaticPage.js:21636:177)
    at Object.<anonymous> (/Users/sergey/code/project/.antwar/build/bundleStaticPage.js:48236:99)
    at __webpack_require__ (/Users/sergey/code/project/.antwar/build/bundleStaticPage.js:21:30)
    at Object.<anonymous> (/Users/sergey-/code/project/.antwar/build/bundleStaticPage.js:48418:19)
    at __webpack_require__ (/Users/sergey/code/project/.antwar/build/bundleStaticPage.js:21:30)
    at Object.<anonymous> (/Users/sergey/code/project/.antwar/build/bundleStaticPage.js:51:15)
    at __webpack_require__ (/Users/sergey/code/project/.antwar/build/bundleStaticPage.js:21:30)
    at /Users/sergey/code/project/.antwar/build/bundleStaticPage.js:41:18
    at Object.<anonymous> (/Users/sergey/code/project/.antwar/build/bundleStaticPage.js:44:10)

Please let me know what I'm doing wrong or what could be done to fix that.

Thank you, any help appreciated.

OS X 10.10.5 node v4.1.1 npm v3.3.5

bebraw commented 8 years ago

When trying again antwar --init project inside my ~/code directory I got this error: ...

Fixed. Try updating the CLI. The problem was that it tried to read antwar.config.js even when initializing a project so I got rid of that in this particular case.

While that error was confusing, antwar did create an project folder with some files and so I proceeded with cd project and antwar --develop and got this output:

This might be harder to solve. npm changed peer dependency behavior in npm 3. And incidentally Antwar themes depend on that... Perhaps the most sensible solution would be to convert to regular dependencies? Any thoughts? What's the preferred way to deal with this in npm 3?

CC @eldh

bebraw commented 8 years ago

@sergeylukin I replaced the peer dependencies with regular ones. Can you give it another go now?

sergeylukin commented 8 years ago

Works like a charm!

bebraw commented 8 years ago

Ok, great to hear!