sighjs / sigh

multi-process expressive build system for the web and node.js, built using baconjs observables
209 stars 12 forks source link

sigh plugin scaffolding: babel version issue #27

Closed Strate closed 8 years ago

Strate commented 8 years ago
sigh -p plugin-name
# answer a questions
cd sigh-plugin-name
sigh -w

/devel/src/hotfix/megaplan/front/build/sigh/sigh-typescript/node_modules/babel/index.js:1
(function (exports, require, module, __filename, __dirname) { throw new Error("The node API for `babel` has been moved to `babel-core`.");
                                                              ^

Error: The node API for `babel` has been moved to `babel-core`.
    at Object.<anonymous> (/devel/src/hotfix/megaplan/front/build/sigh/sigh-typescript/node_modules/babel/index.js:1:69)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at process.prepare (eval at <anonymous> (/devel/src/hotfix/megaplan/front/build/sigh/sigh-typescript/node_modules/process-pool/lib/childProcess.js:14:15), <anonymous>:2:15)
    at process.<anonymous> (/devel/src/hotfix/megaplan/front/build/sigh/sigh-typescript/node_modules/process-pool/lib/childProcess.js:16:20)
    at emitTwo (events.js:87:13)
    at process.emit (events.js:172:7)
    at handleMessage (internal/child_process.js:695:10)
    at Pipe.channel.onread (internal/child_process.js:440:11)
/devel/src/hotfix/megaplan/front/build/sigh/sigh-typescript/node_modules/babel/index.js:1
(function (exports, require, module, __filename, __dirname) { throw new Error("The node API for `babel` has been moved to `babel-core`.");
                                                              ^

Error: The node API for `babel` has been moved to `babel-core`.
    at Object.<anonymous> (/devel/src/hotfix/megaplan/front/build/sigh/sigh-typescript/node_modules/babel/index.js:1:69)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at process.prepare (eval at <anonymous> (/devel/src/hotfix/megaplan/front/build/sigh/sigh-typescript/node_modules/process-pool/lib/childProcess.js:14:15), <anonymous>:2:15)
    at process.<anonymous> (/devel/src/hotfix/megaplan/front/build/sigh/sigh-typescript/node_modules/process-pool/lib/childProcess.js:16:20)
    at emitTwo (events.js:87:13)
    at process.emit (events.js:172:7)
    at handleMessage (internal/child_process.js:695:10)
    at Pipe.channel.onread (internal/child_process.js:440:11)
^C

Seems that it is babel version issue.

insidewhy commented 8 years ago

Please update sigh, the latest version pegs the peer dependency version of babel to 5. There is a ticket in the sigh-babel project for updating.

insidewhy commented 8 years ago

I'll double check the version pegging is affecting the scaffolder.

Strate commented 8 years ago

@ohjames I have made a fresh install an hour ago

insidewhy commented 8 years ago

Weird, checkout https://github.com/sighjs/sigh-babel/blob/master/package.json#L32 the version of babel should be pegged below version 6. Maybe it has used an earlier sigh-babel or something.

insidewhy commented 8 years ago

Okay so npm install pkg doesn't respect peerDependency versions of other dependencies. At least it gives you a warning. I need to make a change... somewhere...

insidewhy commented 8 years ago

Since yeoman's npmInstall does not respect peer dependencies (just like npm install) then... I guess ideally I need a yeoman API that will install all unresolved peer dependencies. Otherwise I'll have to write that myself or hack it, either of which is kinda annoying ;)

insidewhy commented 8 years ago

With the latest version (released in the last 10 minutes) you just need to npm install babel@5 inside the project after it has been generated for you. Which of course is less than ideal.

insidewhy commented 8 years ago

Check out this yeoman issue. Basically... there is no way around this issue. I shoulda chosen a better generator. Argh.

Strate commented 8 years ago

Or you can update sigh-babel to babel 6 =) Okay, I am go to manually change dependency of babel

insidewhy commented 8 years ago

I've updated the docs for now and sigh-cli, ideally need to find a way to handle it automatically, or just update sigh-babel to babel 6.