मैं एक स्क्रिप्ट है कि इस तरह दिखता है के लिए कोशिश कर रहा हूँ से NPM लिपि में mkdir उपयोग नहीं कर सकते:विंडोज
{
"scripts":
"setup": "mkdir -p ./my-dir"
}
और यह विफल रहता है कम से कम Windows पर, भले ही मैं एक Git से चलाने के बैश प्रॉम्प्ट यहां तक कि mkdir ./my-dir
भी कोशिश नहीं कर रहा है। मैं किसी भी कारण को समझने में असमर्थ हूं।
त्रुटि यह देता है एक "वाक्य रचना गलत है" त्रुटि है:
> [email protected] stage C:\my-app
> mkdir ./my-dir
The syntax of the command is incorrect.
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "stage"
npm ERR! node v6.4.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] stage: `mkdir ./my-dir`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] stage script 'mkdir ./my-dir'.
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 my-app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! mkdir ./my-dir
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs my-app
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls my-app
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\my-app\npm-debug.log
अगर यह काम नहीं होगा, वहाँ एक खाली निर्देशिका प्रारंभ करने में एक पार मंच के अनुकूल तरीका है? https://www.npmjs.com/package/mkdirp
आप आप हैं, वे त्रुटि संदेश पेस्ट कर सकते हैं? –
आप स्क्रिप्ट को कैसे कॉल कर रहे हैं? 'Npm setup' होना चाहिए –
त्रुटि संदेश जोड़ा गया। मैं 'एनपीएम रन सेटअप 'का उपयोग कर रहा हूं। मेरा वास्तविक आदेश सेटअप नाम नहीं है, यह सिर्फ एक उदाहरण था। – samanime