Mdx: Attempting to `npm i` on Windows 10 fails due to clean step

Created on 6 Oct 2018  路  3Comments  路  Source: mdx-js/mdx

Hey all -

So I wanted to build locally to see if I could tackle an issue! I tried to npm i after cloning but ran into an issue where the scoped package @mdx-js/tag uses a clean step that doesn't work on Windows machines

> @mdx-js/[email protected] prepublish C:\Users\Asim\projects\opensource\mdx\packages\tag
> npm run clean && npm run build


> @mdx-js/[email protected] clean C:\Users\Asim\projects\opensource\mdx\packages\tag
> rm -rf dist


    at Promise.all.then.arr (C:\Users\Asim\projects\opensource\mdx\node_modules\execa\index.js:236:11)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  code: 1,
  killed: false,
  stdout:
   '\n> @mdx-js/[email protected] prepublish C:\\Users\\Asim\\projects\\opensource\\mdx\\packages\\tag\n> npm run clean && npm run build\n\n\n> @mdx-js/[email protected] clean C:\\Users\\Asim\\projects\\opensource\\mdx\\packages\\tag\n> rm -rf dist\n\n',
  stderr:
   '\'rm\' is not recognized as an internal or external command,\r\noperable program or batch file.\r\nnpm ERR! code ELIFECYCLE\nnpm ERR! errno 1\nnpm ERR! @mdx-js/[email protected] clean: `rm -rf dist`\nnpm ERR! Exit status 1\nnpm ERR! \nnpm ERR! Failed at the @mdx-js/[email protected] clean script.\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\n\nnpm ERR! A complete log of this run can be found in:\nnpm ERR!     C:\\Users\\Asim\\AppData\\Roaming\\npm-cache\\_logs\\2018-10-06T06_51_56_504Z-debug.log\nnpm ERR! code ELIFECYCLE\nnpm ERR! errno 1\nnpm ERR! @mdx-js/[email protected] prepublish: `npm run clean && npm run build`\nnpm ERR! Exit status 1\nnpm ERR! \nnpm ERR! Failed at the @mdx-js/[email protected] prepublish script.\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\n\nnpm ERR! A
complete log of this run can be found in:\nnpm ERR!     C:\\Users\\Asim\\AppData\\Roaming\\npm-cache\\_logs\\2018-10-06T06_51_56_522Z-debug.log\n',
  failed: true,
  signal: null,
  cmd: 'npm run prepublish',
  timedOut: false,
  pkg:
   Package {
     _package:
      { name: '@mdx-js/tag',
        license: 'MIT',
        version: '0.15.0',
        repository: 'mdx-js/mdx',
        description:
         'A fully-featured Markdown/MDX React component for ambitious projects',
        main: 'dist/index.js',
        files: [Array],
        scripts: [Object],
        keywords: [Array],
        dependencies: [Object],
        devDependencies: [Object],
        peerDependencies: [Object] },
     _location: 'C:\\Users\\Asim\\projects\\opensource\\mdx\\packages\\tag' },
  exitCode: 1 }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! undefined prepare: `lerna bootstrap && lerna link --force-local`
npm ERR! Exit status 1

Above is the error output. Unfortunately, to my knowledge the rm -rf command on Windows 10 is rm -Recurse -Force because... well I wish I knew!

Anyhoo as far as suggestions go, the rimraf package works like a charm but its up to you!

Where the rm -rf is being invoked

Let me know if there's anything I can provide to help this issue further! I'd love to help

馃悰 typbug

All 3 comments

Please, go ahead and implement rimraf instead, that would be great!

On it!

@aseeeem Ping!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

riceboyler picture riceboyler  路  3Comments

jxnblk picture jxnblk  路  3Comments

dioptre picture dioptre  路  3Comments

trevordmiller picture trevordmiller  路  3Comments

deligent-ant picture deligent-ant  路  3Comments