2016-03-25 8 views
6

मैंने अभी npm update किया है और कुछ नए पैकेज संस्करण प्राप्त किए हैं। इसने मेरा निर्माण तोड़ दिया, जिससे मुझे https://github.com/relayjs/relay-starter-kit/blob/master/scripts/updateSchema.js से डिफ़ॉल्ट updateSchema.js का उपयोग करने में असमर्थ रहा।बेबेल: अज्ञात विकल्प: आधार। बच्चे

यदि कोई इस मुद्दे से पहले से ही निपटा चुका है, तो यदि आप अपना समाधान साझा कर सकते हैं तो इसकी बहुत सराहना की जाएगी।

मुझे पता है कि नए विकल्प 6 संस्करण (https://gist.github.com/hzoo/7e78b12d99e326f2e04f) में कुछ विकल्प हटा दिए गए थे। NPM-debug.log फ़ाइल इस तरह दिखता है:

0 info it worked if it ends with ok 
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe', 
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', 
1 verbose cli 'run', 
1 verbose cli 'update' ] 
2 info using [email protected] 
3 info using [email protected] 
4 verbose run-script [ 'preupdate', 'update', 'postupdate' ] 
5 info preupdate [email protected] 
6 info update [email protected] 
7 verbose unsafe-perm in lifecycle true 
8 info [email protected] Failed to exec update script 
9 verbose stack Error: [email protected] update: `babel-node ./scripts/helpers/updateSchema.js` 
9 verbose stack Exit status 1 
9 verbose stack  at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:214:16) 
9 verbose stack  at emitTwo (events.js:87:13) 
9 verbose stack  at EventEmitter.emit (events.js:172:7) 
9 verbose stack  at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14) 
9 verbose stack  at emitTwo (events.js:87:13) 
9 verbose stack  at ChildProcess.emit (events.js:172:7) 
9 verbose stack  at maybeClose (internal/child_process.js:818:16) 
9 verbose stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) 
10 verbose pkgid [email protected] 
11 verbose cwd C:\bifrostApp 
12 error Windows_NT 10.0.10586 
13 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "update" 
14 error node v4.2.4 
15 error npm v2.14.12 
16 error code ELIFECYCLE 
17 error [email protected] update: `babel-node ./scripts/helpers/updateSchema.js` 
17 error Exit status 1 
18 error Failed at the [email protected] update script 'babel-node ./scripts/helpers/updateSchema.js'. 
18 error This is most likely a problem with the bifrost package, 
18 error not with npm itself. 
18 error Tell the author that this fails on your system: 
18 error  babel-node ./scripts/helpers/updateSchema.js 
18 error You can get their info via: 
18 error  npm owner ls bifrost 
18 error There is likely additional logging output above. 
19 verbose exit [ 1, true ] 

कमांडलाइन त्रुटि इस तरह दिखता है:

ReferenceError: [BABEL] C:\bifrostApp\scripts\helpers\updateSchema.js: Unknown option: base.Children. Check out http://babeljs.io/docs/usage/options/ for more info 
at Logger.error (C:\bifrostApp\node_modules\babel-cli\node_modules\babel-core\lib\transformation\file\logger.js:39:11) 
at OptionManager.mergeOptions (C:\bifrostApp\node_modules\babel-cli\node_modules\babel-core\lib\transformation\file\options\option-manager.js:267:20) 
at OptionManager.init (C:\bifrostApp\node_modules\babel-cli\node_modules\babel-core\lib\transformation\file\options\option-manager.js:465:10) 
at File.initOptions (C:\bifrostApp\node_modules\babel-cli\node_modules\babel-core\lib\transformation\file\index.js:194:75) 
at new File (C:\bifrostApp\node_modules\babel-cli\node_modules\babel-core\lib\transformation\file\index.js:123:22) 
at Pipeline.transform (C:\bifrostApp\node_modules\babel-cli\node_modules\babel-core\lib\transformation\pipeline.js:45:16) 
at Object.transformFileSync (C:\bifrostApp\node_modules\babel-cli\node_modules\babel-core\lib\api\node.js:124:10) 
at compile (C:\bifrostApp\node_modules\babel-cli\node_modules\babel-register\lib\node.js:98:20) 
at loader (C:\bifrostApp\node_modules\babel-cli\node_modules\babel-register\lib\node.js:126:14) 
at Object.require.extensions.(anonymous function) [as .js] (C:\bifrostApp\node_modules\babel-cli\node_modules\babel-register\lib\node.js:136:7) 

उत्तर

0

मैं NPM 2 से उन्नत बनाया -> NPM 3, और करने के लिए 6.5 कोलाहल कोर डाउनग्रेड। 2, यह काम किया।

7

सुनिश्चित करें कि आपके फ़ाइल में सूचीबद्ध प्रीसेट आपके node_modules फ़ोल्डर में स्थापित हैं।

उदाहरण के लिए, अगर आपके पास अपने .babelrc फ़ाइल में निम्न:

{ 
     "presets": ["react", "es2015"] 
    } 

आप "कोलाहल-पूर्व निर्धारित-es2015" और की आवश्यकता होगी "कोलाहल-पूर्व निर्धारित प्रतिक्रिया" npm install --save के साथ स्थापित किया।

संबंधित मुद्दे