2017-10-25 21 views
8

के बाद चेतावनी npm install आदेश पर फेंक दिया जा रहा है -गैर-मैक ओएस पर fpmvents चेतावनी फेंकने npm स्थापित करने के लिए कैसे?

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\rea 
ct-scripts\node_modules\fsevents): 
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected] 
1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"} 
) 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]^1.0.0 (node_modules\ch 
okidar\node_modules\fsevents): 
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected] 
1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"} 
) 

चेतावनी जाहिरा तौर पर हमारे जेनकींस नौकरी में विफल रहा है चिह्नित करने के लिए खड़ी कर रहा है, तो हम सिर्फ एक ही से छुटकारा पाने की कोशिश कर रहे हैं।

मैंने पहले से ही इस https://stackoverflow.com/a/42938398/351903 की जांच की है, लेकिन इसके उल्लेख के विपरीत, मेरे पास मेरे सेटअप में कोई/node_modules/fserrors नहीं है। इसके अलावा, मेरे पैकेज.जेसन में fserrors नहीं है। बाद मेरी package.json है -

{ 
    "name": "mvc-panel", 
    "version": "0.1.0", 
    "private": true, 
    "dependencies": { 
    "bootstrap": "^3.3.7", 
    "jquery": "^3.2.1", 
    "material-ui": "^0.18.3", 
    "qs": "^6.4.0", 
    "react": "^15.5.4", 
    "react-alert": "^2.1.2", 
    "react-bootstrap-table": "^3.4.1", 
    "react-dom": "^15.5.4", 
    "react-loader": "^2.4.2", 
    "react-router-dom": "^4.1.1", 
    "react-tap-event-plugin": "^2.0.1", 
    "serve": "^6.0.0" 
    }, 
    "devDependencies": { 
    "datatables.net": "^1.10.15", 
    "jquery": "^3.2.1", 
    "react-scripts": "^1.0.7" 
    }, 
    "scripts": { 
    "start": "react-scripts start", 
    "build": "react-scripts build", 
    "test": "react-scripts test --env=jsdom", 
    "eject": "react-scripts eject" 
    } 
} 

मैं प्रतिक्रिया-लिपियों के package.json में fsevents node_modules\react-scripts\package.json में (जो मेरे package.json की devDependencies के तहत परिभाषित किया गया है) देख सकते हैं -

{ 
    "_args": [ 
    [ 
     { 
     "raw": "[email protected]^1.0.7", 
     "scope": null, 
     "escapedName": "react-scripts", 
     "name": "react-scripts", 
     "rawSpec": "^1.0.7", 
     "spec": ">=1.0.7 <2.0.0", 
     "type": "range" 
     }, 
     "D:\\Sandeepan\\Payu MVC\\backend codebase\\MVC2.0\\panel\\mvc-panel" 
    ] 
    ], 
    "_from": "[email protected]>=1.0.7 <2.0.0", 
    "_id": "[email protected]", 
    "_inCache": true, 
    "_location": "/react-scripts", 
    "_nodeVersion": "8.5.0", 
    "_npmOperationalInternal": { 
    "host": "s3://npm-registry-packages", 
    "tmp": "tmp/react-scripts-1.0.14.tgz_1506471610836_0.5613740666303784" 
    }, 
    "_npmUser": { 
    "name": "timer", 
    "email": "[email protected]" 
    }, 
    "_npmVersion": "5.3.0", 
    "_phantomChildren": { 
    "asap": "2.0.6", 
    "escape-string-regexp": "1.0.5", 
    "graceful-fs": "4.1.11", 
    "has-ansi": "2.0.0", 
    "universalify": "0.1.1" 
    }, 
    "_requested": { 
    "raw": "[email protected]^1.0.7", 
    "scope": null, 
    "escapedName": "react-scripts", 
    "name": "react-scripts", 
    "rawSpec": "^1.0.7", 
    "spec": ">=1.0.7 <2.0.0", 
    "type": "range" 
    }, 
    "_requiredBy": [ 
    "#DEV:/" 
    ], 
    "_resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-1.0.14.tgz", 
    "_shasum": "70fe76c9beb67b136b953e875bdfe4ad78d410d1", 
    "_shrinkwrap": null, 
    "_spec": "[email protected]^1.0.7", 
    "_where": "D:\\Sandeepan\\Payu MVC\\backend codebase\\MVC2.0\\panel\\mvc-panel", 
    "bin": { 
    "react-scripts": "./bin/react-scripts.js" 
    }, 
    "bugs": { 
    "url": "https://github.com/facebookincubator/create-react-app/issues" 
    }, 
    "dependencies": { 
    "autoprefixer": "7.1.2", 
    "babel-core": "6.25.0", 
    "babel-eslint": "7.2.3", 
    "babel-jest": "20.0.3", 
    "babel-loader": "7.1.1", 
    "babel-preset-react-app": "^3.0.3", 
    "babel-runtime": "6.26.0", 
    "case-sensitive-paths-webpack-plugin": "2.1.1", 
    "chalk": "1.1.3", 
    "css-loader": "0.28.4", 
    "dotenv": "4.0.0", 
    "eslint": "4.4.1", 
    "eslint-config-react-app": "^2.0.1", 
    "eslint-loader": "1.9.0", 
    "eslint-plugin-flowtype": "2.35.0", 
    "eslint-plugin-import": "2.7.0", 
    "eslint-plugin-jsx-a11y": "5.1.1", 
    "eslint-plugin-react": "7.1.0", 
    "extract-text-webpack-plugin": "3.0.0", 
    "file-loader": "0.11.2", 
    "fs-extra": "3.0.1", 
    "fsevents": "1.1.2", 
    "html-webpack-plugin": "2.29.0", 
    "jest": "20.0.4", 
    "object-assign": "4.1.1", 
    "postcss-flexbugs-fixes": "3.2.0", 
    "postcss-loader": "2.0.6", 
    "promise": "8.0.1", 
    "react-dev-utils": "^4.1.0", 
    "style-loader": "0.18.2", 
    "sw-precache-webpack-plugin": "0.11.4", 
    "url-loader": "0.5.9", 
    "webpack": "3.5.1", 
    "webpack-dev-server": "2.8.2", 
    "webpack-manifest-plugin": "1.2.1", 
    "whatwg-fetch": "2.0.3" 
    }, 
    "description": "Configuration and scripts for Create React App.", 
    "devDependencies": { 
    "react": "^15.5.4", 
    "react-dom": "^15.5.4" 
    }, 
    "directories": {}, 
    "dist": { 
    "integrity": "sha512-+p0q2N2WW7L4WW6uObqN7fYwSQZ9fBI0StpMYl1Ukoz/lCbemf+yW6b8refyhTsGy62GAqxlpyEfVcTE3hJAxg==", 
    "shasum": "70fe76c9beb67b136b953e875bdfe4ad78d410d1", 
    "tarball": "https://registry.npmjs.org/react-scripts/-/react-scripts-1.0.14.tgz" 
    }, 
    "engines": { 
    "node": ">=6" 
    }, 
    "files": [ 
    "bin", 
    "config", 
    "scripts", 
    "template", 
    "utils" 
    ], 
    "homepage": "https://github.com/facebookincubator/create-react-app#readme", 
    "license": "MIT", 
    "maintainers": [ 
    { 
     "name": "timer", 
     "email": "[email protected]" 
    }, 
    { 
     "name": "fb", 
     "email": "[email protected]" 
    }, 
    { 
     "name": "gaearon", 
     "email": "[email protected]" 
    } 
    ], 
    "name": "react-scripts", 
    "optionalDependencies": { 
    "fsevents": "1.1.2" 
    }, 
    "readme": "ERROR: No README data found!", 
    "repository": { 
    "type": "git", 
    "url": "git+https://github.com/facebookincubator/create-react-app.git" 
    }, 
    "version": "1.0.14" 
} 

अद्यतन

मैंने एनपीएम इंस्टॉल कमांड चलाने और पहले कमांड की निकास स्थिति प्राप्त करने का प्रयास किया। यह चेतावनियों के बावजूद 0 अर्थ सफलता दिखाता है। इसलिए, ऐसा नहीं लगता है कि जेनकिंस नौकरी इस वजह से फंसनी चाहिए। हालांकि, हम अभी भी इस चेतावनी से छुटकारा पाने के लिए एक रास्ता खोजने की कोशिश कर रहे हैं क्योंकि यह हमारे ओएस के लिए प्रासंगिक नहीं है।

उत्तर

14

fsevents मैक और अन्य लिनक्स सिस्टम में अलग-अलग निपटाया जाता है। लिनक्स सिस्टम fsevents को अनदेखा करता है जबकि मैक इसे इंस्टॉल करता है। चूंकि उपर्युक्त त्रुटि संदेश बताता है कि fsevents वैकल्पिक है और इसे स्थापना प्रक्रिया में छोड़ दिया गया है।

आप उपरोक्त चेतावनी से बचने के लिए लिनक्स सिस्टम में npm install --no-optional कमांड चला सकते हैं।

अधिक जानकारी

https://github.com/npm/npm/issues/14185

https://github.com/npm/npm/issues/5095

0

हाँ, यह के साथ काम करता है जब अल्पविराम nd npm install --no-optional
का प्रयोग पर्यावरण:

  • iTerm2
  • MacOS मेरी वी एम ubuntu16 LTS करने के लिए प्रवेश।
0

मुझे एक ही त्रुटि मिली। मेरे मामले में, मैं एक दूसरे कंप्यूटर के कोड को संपादित करने के लिए मैप किए गए ड्राइव का उपयोग कर रहा था, वह कंप्यूटर लिनक्स चला रहा था। निश्चित नहीं है कि क्यों गल्फ-घड़ी स्थापित करने से पहले ऑपरेटिंग सिस्टम संगतता पर निर्भर करता है (मुझे लगता है कि इसे सुरक्षा उद्देश्यों के साथ करना है)। अनिवार्य रूप से त्रुटि आपके ऑपरेटिंग सिस्टम और नोड मॉड्यूल को कॉल करने वाली ऑपरेटिंग सिस्टम के खिलाफ जांच कर रही है, मेरे मामले में दो ऑपरेटिंग सिस्टम समान नहीं थे, इसलिए यह त्रुटि को फेंक दिया। जो आपकी त्रुटि के दिखने से मेरा जैसा ही है।

त्रुटि

Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) 

मैं इसे कैसे तय?

मैं सीधे linux कंप्यूटर में लॉग इन किया और

npm install --save-dev <module-name> 

भाग गया तब मेरे कोडिंग के माहौल में वापस चला गया और सब कुछ है कि के बाद ठीक किया गया था।

आशा है कि मदद करता है!

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