Skip to content

Attempting to npm i on Windows 10 fails due to clean step #287

@aseeeem

Description

@aseeeem

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/tag@0.15.0 prepublish C:\Users\Asim\projects\opensource\mdx\packages\tag
> npm run clean && npm run build


> @mdx-js/tag@0.15.0 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/tag@0.15.0 prepublish C:\\Users\\Asim\\projects\\opensource\\mdx\\packages\\tag\n> npm run clean && npm run build\n\n\n> @mdx-js/tag@0.15.0 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/tag@0.15.0 clean: `rm -rf dist`\nnpm ERR! Exit status 1\nnpm ERR! \nnpm ERR! Failed at the @mdx-js/tag@0.15.0 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/tag@0.15.0 prepublish: `npm run clean && npm run build`\nnpm ERR! Exit status 1\nnpm ERR! \nnpm ERR! Failed at the @mdx-js/tag@0.15.0 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions