Skip to content

When I first pack, there will be a file loss. If I copy the CHANGELOG.md file back, it's normal. #182

@WangShuXian6

Description

@WangShuXian6

Bug report

  • {package-name} version: x.x.x ()

Current behaviour

When I first pack, there will be a file loss. If I copy the CHANGELOG.md file back, it's normal.

npm run build > test-npm-ts@0.0.0 prebuild /Volumes/MAC1/file/test/npm/typescript-lib-starter > npm run cleanup && npm run verify > test-npm-ts@0.0.0 cleanup /Volumes/MAC1/file/test/npm/typescript-lib-starter > shx rm -rf dist > test-npm-ts@0.0.0 verify /Volumes/MAC1/file/test/npm/typescript-lib-starter > npm run validate-js && npm run style && npm run test:ci > test-npm-ts@0.0.0 validate-js /Volumes/MAC1/file/test/npm/typescript-lib-starter > tsc -p ./config && tsc -p ./scripts > test-npm-ts@0.0.0 style /Volumes/MAC1/file/test/npm/typescript-lib-starter > npm run format -- --list-different && npm run lint > test-npm-ts@0.0.0 format /Volumes/MAC1/file/test/npm/typescript-lib-starter > prettier "**/*.{ts,tsx,js,jsx,css,scss,sass,less,md}" "--list-different" > test-npm-ts@0.0.0 lint /Volumes/MAC1/file/test/npm/typescript-lib-starter > tslint --project tsconfig.json --format codeFrame > test-npm-ts@0.0.0 test:ci /Volumes/MAC1/file/test/npm/typescript-lib-starter > npm t -- --ci > test-npm-ts@0.0.0 test /Volumes/MAC1/file/test/npm/typescript-lib-starter > jest -c ./config/jest.config.js "--ci" PASS src/__tests__/greeter.spec.ts Greeter ✓ should greet (3ms) ✓ should greet and print deprecation message if in dev mode (9ms) console.warn node_modules/jest-mock/build/index.js:711 this method is deprecated, use #greet instead Test Suites: 1 passed, 1 total Tests: 2 passed, 2 total Snapshots: 0 total Time: 4.048s Ran all test suites. > test-npm-ts@0.0.0 build /Volumes/MAC1/file/test/npm/typescript-lib-starter > tsc && tsc --target es2018 --outDir dist/esm2015 && rollup -c config/rollup.config.js && rollup -c config/rollup.config.js --environment NODE_ENV:production /Volumes/MAC1/file/test/npm/typescript-lib-starter/dist/esm5/index.js → dist/bundles/index.umd.js... created dist/bundles/index.umd.js in 28ms /Volumes/MAC1/file/test/npm/typescript-lib-starter/dist/esm2015/index.js → dist/bundles/index.esm.js... created dist/bundles/index.esm.js in 8ms /Volumes/MAC1/file/test/npm/typescript-lib-starter/dist/esm5/index.js → dist/bundles/index.umd.min.js... created dist/bundles/index.umd.min.js in 259ms /Volumes/MAC1/file/test/npm/typescript-lib-starter/dist/esm2015/index.js → dist/bundles/index.esm.min.js... created dist/bundles/index.esm.min.js in 182ms > test-npm-ts@0.0.0 postbuild /Volumes/MAC1/file/test/npm/typescript-lib-starter > node scripts/copy && npm run size fs.js:119 throw err; ^ Error: ENOENT: no such file or directory, copyfile '/Volumes/MAC1/file/test/npm/typescript-lib-starter/CHANGELOG.md' -> '/Volumes/MAC1/file/test/npm/typescript-lib-starter/dist/CHANGELOG.md' at copyFileSync (fs.js:1743:3) at source.forEach (/Volumes/MAC1/file/test/npm/typescript-lib-starter/scripts/copy.js:43:7) at Array.forEach (<anonymous>) at cp (/Volumes/MAC1/file/test/npm/typescript-lib-starter/scripts/copy.js:42:12) at main (/Volumes/MAC1/file/test/npm/typescript-lib-starter/scripts/copy.js:22:3) at Object.<anonymous> (/Volumes/MAC1/file/test/npm/typescript-lib-starter/scripts/copy.js:11:1) at Module._compile (internal/modules/cjs/loader.js:738:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10) at Module.load (internal/modules/cjs/loader.js:630:32) at tryModuleLoad (internal/modules/cjs/loader.js:570:12) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! test-npm-ts@0.0.0 postbuild: `node scripts/copy && npm run size` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the test-npm-ts@0.0.0 postbuild script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /Users/wsx/.npm/_logs/2019-03-04T01_33_39_760Z-debug.log

Expected behaviour

Please explain how you'd expect it to behave.

Feature request

Use case(s)

Explain the rationale for this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions