Skip to content
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

[ERROR] node app.js command #82

Closed
benathmane opened this issue May 10, 2016 · 20 comments
Closed

[ERROR] node app.js command #82

benathmane opened this issue May 10, 2016 · 20 comments
Labels

Comments

@benathmane
Copy link

sudo node app.js
/home/abenathmane/Desktop/mozaik/node_modules/babel-core/lib/transformation/file/options/option-manager.js:126
if (!option) this.log.error("Unknown option: " + alias + "." + key, ReferenceError);
^

TypeError: Cannot read property 'error' of undefined
at OptionManager.mergeOptions (/home/abenathmane/Desktop/mozaik/node_modules/babel-core/lib/transformation/file/options/option-manager.js:126:28)
at OptionManager.addConfig (/home/abenathmane/Desktop/mozaik/node_modules/babel-core/lib/transformation/file/options/option-manager.js:107:10)
at OptionManager.findConfigs (/home/abenathmane/Desktop/mozaik/node_modules/babel-core/lib/transformation/file/options/option-manager.js:168:35)
at OptionManager.init (/home/abenathmane/Desktop/mozaik/node_modules/babel-core/lib/transformation/file/options/option-manager.js:229:12)
at compile (/home/abenathmane/Desktop/mozaik/node_modules/babel-core/lib/api/register/node.js:117:22)
at normalLoader (/home/abenathmane/Desktop/mozaik/node_modules/babel-core/lib/api/register/node.js:199:14)
at Object.require.extensions.(anonymous function) as .js
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)

@plouc
Copy link
Owner

plouc commented May 10, 2016

Ok, you got an error using babel :) some context could be useful, I have no idea what's your actual setup, node version, Mozaïk version, activated extensions…

@benathmane
Copy link
Author

Thanks,
npm version : v3.8.6
Mozaik version : v1.4.4
node version : v6.1.0
Activated extesions : mozaik-ext-jenkins

@alexandregodard
Copy link

This solution help me
http://www.guyellisrocks.com/2015/11/babel-cannot-read-property-error-of.html
remove all files .babelrc in node-modules subdir

@t3db0t
Copy link

t3db0t commented Jun 15, 2016

Hm, I'm getting this exact same error but I don't have a .babelrc file at all. What else can I check?

npm 3.9.3
Mozaik 1.4.4
node 6.2.1
Babel 6.5.2 / babel-core 6.9.1

@alexandregodard
Copy link

Hi,

you need to have at least one .babelrc file on your root application with :
{
"presets": ["es2015", "react" ],
}

@t3db0t
Copy link

t3db0t commented Jun 16, 2016

I did that, and rebuilt, but I'm still getting the same error. Arggghhhhh.

@t3db0t
Copy link

t3db0t commented Jun 16, 2016

Hm, I just noticed that package.json lists babel": "^5.8.12" but I have 6.5.2. I tried downgrading and various combinations of .babelrc present or in different directories, nothing worked, same error every time. I tried changing the version required in package.json to 6.5.2 and then I get Error: Cannot find module 'babel/register'. I tried to fix that but it was just more and more new errors. Still haven't been able to run the app.

@plouc
Copy link
Owner

plouc commented Aug 19, 2016

@t3db0t, is this issue still relevant ?

@plouc plouc added the bug label Aug 19, 2016
@t3db0t
Copy link

t3db0t commented Aug 19, 2016

I haven't tried since then, but I never got it to work

@GordianDziwis
Copy link

@plouc I got it, too

@benathmane
Copy link
Author

@BonarBeavis This solution help me
http://www.guyellisrocks.com/2015/11/babel-cannot-read-property-error-of.html
remove all files .babelrc in node-modules subdir

@wonderchang
Copy link

@benathmane But after removing them, the command gulp build become failed, this is not friendly when developing.

@jtbonhomme
Copy link

Same error for me:

node v0.10.28
npm 3.10.7
Mac OS X 10.12
babel@5.8.38
mozaik@1.4.4

I followed the instructions :

% npm install -g yo gulp generator-mozaik
% yo mozaik
% npm install
% gulp build
% node app.js

/Users/jbonhomm/Dropbox/dashboards/mozaik/node_modules/babel-core/lib/transformation/file/options/option-manager.js:126
      if (!option) this.log.error("Unknown option: " + alias + "." + key, Refe
                            ^
TypeError: Cannot call method 'error' of undefined
    at OptionManager.mergeOptions (/Users/jbonhomm/Dropbox/dashboards/mozaik/node_modules/babel-core/lib/transformation/file/options/option-manager.js:126:29)
    at OptionManager.addConfig (/Users/jbonhomm/Dropbox/dashboards/mozaik/node_modules/babel-core/lib/transformation/file/options/option-manager.js:107:10)
    at OptionManager.findConfigs (/Users/jbonhomm/Dropbox/dashboards/mozaik/node_modules/babel-core/lib/transformation/file/options/option-manager.js:168:35)
    at OptionManager.init (/Users/jbonhomm/Dropbox/dashboards/mozaik/node_modules/babel-core/lib/transformation/file/options/option-manager.js:229:12)
    at compile (/Users/jbonhomm/Dropbox/dashboards/mozaik/node_modules/babel-core/lib/api/register/node.js:117:22)
    at normalLoader (/Users/jbonhomm/Dropbox/dashboards/mozaik/node_modules/babel-core/lib/api/register/node.js:199:14)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/jbonhomm/Dropbox/dashboards/mozaik/node_modules/babel-core/lib/api/register/node.js:216:7)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)

@plouc
Copy link
Owner

plouc commented Oct 27, 2016

@jtbonhomme, the yeoman generator does not work, sorry, I should mark it as deprecated on the website and the repo. You should use the mozaik-demo instead.

@jtbonhomme
Copy link

Ok Raphaël, thank you for your answer !

Envoyé de mon iPhone

Le 27 oct. 2016 à 14:15, Raphaël Benitte notifications@github.com a écrit :

@jtbonhomme, the yeoman generator does not work, sorry, I should mark it as deprecated on the website and the repo. You should use the mozaik-demo instead.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@ududsha
Copy link

ududsha commented Dec 6, 2016

Got the same error under the same condition which @jtbonhomme mentioned. Any solution found by anyone?

@juhamust
Copy link
Contributor

juhamust commented Dec 6, 2016

@ududsha are you using mozaik-demo or yeoman generator as a base? If latter, use the mozaik-demo instead.

@plouc
Copy link
Owner

plouc commented Dec 10, 2016

I've removed the reference to yeoman generator from the README and website.

@nixchikleo
Copy link

nixchikleo commented May 24, 2017

@plouc the references are still on the website: does this mean they are current now? https://www.npmjs.com/package/mozaik
due to bureaucracy etc I cannot use the demo for a few days. was there ever anyway to fix error thrown by the generator? For now i just commented out the line that checks for an invalid option and throws an error message to get it to deploy. But is there a better solution?

@plouc
Copy link
Owner

plouc commented Jul 15, 2017

Removed the ref to generator => https://github.com/plouc/mozaik/blob/master/README.md

@plouc plouc closed this as completed Jul 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants