create-react-library icon indicating copy to clipboard operation
create-react-library copied to clipboard

create-react-library fails to create new project

Open curiousercreative opened this issue 4 years ago • 4 comments

macOS 10.14.6 node v12.16.1 yarn 1.22.4 create-react-library 3.0.9

✔ Copying default template to PROJECT_DIR

Initializing npm dependencies. This will take a minute.

✔ Running yarn install in root directory
✖ Running yarn install in example directory
Error: Command failed with exit code 1: yarn install
warning react-scripts > webpack-dev-server > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning react-scripts > webpack-dev-server > chokidar > [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning react-scripts > babel-jest > @jest/transform > jest-haste-map > [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning react-scripts > jest-environment-jsdom-fourteen > jsdom > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning react-scripts > webpack > watchpack > watchpack-chokidar2 > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning react-scripts > jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning react-scripts > resolve-url-loader > rework > css > [email protected]: Please see https://github.com/lydell/urix#deprecated
warning react-scripts > resolve-url-loader > rework > css > source-map-resolve > [email protected]: Please see https://github.com/lydell/urix#deprecated
warning react-scripts > jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > [email protected]: use String.prototype.padStart()
warning react-scripts > resolve-url-loader > rework > css > source-map-resolve > [email protected]: https://github.com/lydell/resolve-url#deprecated
warning react-scripts > workbox-webpack-plugin > workbox-build > strip-comments > babel-plugin-transform-object-rest-spread > babel-runtime > [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning "react-scripts > @typescript-eslint/eslint-plugin > [email protected]" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
error An unexpected error occurred: "ENOENT: no such file or directory, lstat 'PROJECT_DIR/node_modules/react-scripts/node_modules/@babel/plugin-syntax-object-rest-spread'".
yarn install v1.22.4
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
info If you think this is a bug, please open a bug report with the information provided in "PROJECT_DIR/example/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
    at makeError (~/.nvm/versions/node/v12.16.1/lib/node_modules/create-react-library/node_modules/execa/lib/error.js:59:11)
    at handlePromise (~/.nvm/versions/node/v12.16.1/lib/node_modules/create-react-library/node_modules/execa/index.js:114:26)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async pEachSeries (~/.nvm/versions/node/v12.16.1/lib/node_modules/create-react-library/node_modules/p-each-series/index.js:8:3) {
  shortMessage: 'Command failed with exit code 1: yarn install',
  command: 'yarn install',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: 'yarn install v1.22.4\n' +
    'info No lockfile found.\n' +
    '[1/4] Resolving packages...\n' +
    '[2/4] Fetching packages...\n' +
    '[3/4] Linking dependencies...\n' +
    'info If you think this is a bug, please open a bug report with the information provided in "PROJECT_DIR/example/yarn-error.log".\n' +
    'info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.',
  stderr: 'warning react-scripts > webpack-dev-server > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.\n' +
    'warning react-scripts > webpack-dev-server > chokidar > [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.\n' +
    'warning react-scripts > babel-jest > @jest/transform > jest-haste-map > [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.\n' +
    'warning react-scripts > jest-environment-jsdom-fourteen > jsdom > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142\n' +
    'warning react-scripts > webpack > watchpack > watchpack-chokidar2 > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.\n' +
    'warning react-scripts > jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142\n' +
    'warning react-scripts > resolve-url-loader > rework > css > [email protected]: Please see https://github.com/lydell/urix#deprecated\n' +
    'warning react-scripts > resolve-url-loader > rework > css > source-map-resolve > [email protected]: Please see https://github.com/lydell/urix#deprecated\n' +
    'warning react-scripts > jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > [email protected]: use String.prototype.padStart()\n' +
    'warning react-scripts > resolve-url-loader > rework > css > source-map-resolve > [email protected]: https://github.com/lydell/resolve-url#deprecated\n' +
    'warning react-scripts > workbox-webpack-plugin > workbox-build > strip-comments > babel-plugin-transform-object-rest-spread > babel-runtime > [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.\n' +
    'warning "react-scripts > @typescript-eslint/eslint-plugin > [email protected]" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".\n' +
    `error An unexpected error occurred: "ENOENT: no such file or directory, lstat 'PROJECT_DIR/node_modules/react-scripts/node_modules/@babel/plugin-syntax-object-rest-spread'".`,
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

curiousercreative avatar May 22 '20 19:05 curiousercreative

Running yarn add @babel/plugin-syntax-object-rest-spread inside the example folder fixed the issue.

You can now start the example project by running yarn run start :)

victorpremandrews avatar May 22 '20 23:05 victorpremandrews

I have this issue too, which seems to work after yarn install as mentioned by @victorpremandrews , but it's taking forever to run the dev environment with yarn start. Am I missing any step after yarn install?

yoonwaiyan avatar May 27 '20 12:05 yoonwaiyan

This should be fixed now as of v3.1.1.

transitive-bullshit avatar Jun 01 '20 07:06 transitive-bullshit

I faced this issue too, with node v13.2.0. Upgrading my node version to v14.4.0 fixed it.

alesmit avatar Jun 08 '20 10:06 alesmit