JSRocksHQ / harmonic

The next static site generator
http://harmonicjs.com/
MIT License
282 stars 26 forks source link

Harmonic's fresh new build issues #184

Closed jaydson closed 8 years ago

jaydson commented 8 years ago

I'm trying to build Harmonic and it's not working properly.

Node.js version: 5.4.0 npm version: 3.3.12 OS: Ubuntu 14.04

Steps to reproduce:

Error: Cannot find module '../dist/bin/cli/harmonic'

Then I tried to run npm run dev:

[23:03:41] Watching src/ directory for changes...
/home/jaydson/Workspace/harmonic/node_modules/gulp-eslint/node_modules/eslint/lib/eslint.js:771
            location = node.loc.start;
                               ^

TypeError: Cannot read property 'start' of undefined
    at EventEmitter.module.exports.api.report (/home/jaydson/Workspace/harmonic/node_modules/gulp-eslint/node_modules/eslint/lib/eslint.js:771:32)
    at RuleContext.report (/home/jaydson/Workspace/harmonic/node_modules/gulp-eslint/node_modules/eslint/lib/rule-context.js:98:16)
    at /home/jaydson/Workspace/harmonic/node_modules/gulp-eslint/node_modules/eslint/lib/rules/no-undef.js:80:29
    at Array.forEach (native)
    at EventEmitter.Program:exit (/home/jaydson/Workspace/harmonic/node_modules/gulp-eslint/node_modules/eslint/lib/rules/no-undef.js:71:33)
    at emitOne (events.js:82:20)
    at EventEmitter.emit (events.js:169:7)
    at Controller.controller.traverse.leave (/home/jaydson/Workspace/harmonic/node_modules/gulp-eslint/node_modules/eslint/lib/eslint.js:732:25)
    at Controller.__execute (/home/jaydson/Workspace/harmonic/node_modules/gulp-eslint/node_modules/eslint/node_modules/estraverse/estraverse.js:397:31)
    at Controller.traverse (/home/jaydson/Workspace/harmonic/node_modules/gulp-eslint/node_modules/eslint/node_modules/estraverse/estraverse.js:485:28)

npm ERR! Linux 3.13.0-74-generic
npm ERR! argv "/home/jaydson/.nvm/versions/node/v5.4.0/bin/node" "/home/jaydson/.nvm/versions/node/v5.4.0/bin/npm" "run" "dev"
npm ERR! node v5.4.0
npm ERR! npm  v3.3.12
npm ERR! code ELIFECYCLE
npm ERR! harmonic@0.5.1 dev: `gulp`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the harmonic@0.5.1 dev script 'gulp'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the harmonic package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     gulp
npm ERR! You can get their info via:
npm ERR!     npm owner ls harmonic
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/jaydson/Workspace/harmonic/npm-debug.log

I'm investigating this right now, but I want to keep the history here in case others have the same issue.

jaydson commented 8 years ago

It looks like the documentation is wrong. I have everything working now, here's the steps:

Thoughts @UltCombo ?

UltCombo commented 8 years ago

I can confirm the build (npm test / npm run dev) is failing, seems to be due to a bug in ESLint or babel-eslint. We can try updating these to latest, though I'd like to land these changes on es20xx simultaneously. In fact, I already have the latest ESLint working on an es20xx-generated project, I just have to apply these changes to es20xx and Harmonic.

The link issue seems to be due to the failing build—as the build is failing, there is no dist directory (which is where all the compiled code that is executed by Node resides).

jaydson commented 8 years ago

So, fixing the documentation and updating es20xx will solve the problem, right?

UltCombo commented 8 years ago

I'll update our ESLint-related dependencies and migrate our .eslintrc to the new version's format. That should fix the issue.

jaydson commented 8 years ago

:+1:

UltCombo commented 8 years ago

I'm updating npm and doing a clean npm install to make sure that the issue is fixed.

UltCombo commented 8 years ago

I've committed 77b6555c400b9fc93cdb34159c156366c5b90347, now npm run dev should at least generate the dist directory properly.

Though, I'm now getting a different error with ESLint:

Cannot find module 'babel-runtime/helpers/interop-export-wildcard'

I'm not sure if this is a problem with my installation, but at least it is not breaking the build.

UltCombo commented 8 years ago

@jaydson Can you check if the build is working for you?

jaydson commented 8 years ago

You mean trying to build from zero again?

UltCombo commented 8 years ago

git pull && rm -rf node_modules && npm i

jaydson commented 8 years ago

It worked.

UltCombo commented 8 years ago

Is ESLint working correctly for you?

UltCombo commented 8 years ago

The problem with ESLint was that npm@3's maximally flat dependencies tree was using an outdated babel-runtime dependency for babel-eslint due to our own babel-runtime being outdated. This should fix it: 98f4486e8208bdda49c9c2c5a2ff36add3ff606c