Skip to content

yarn build fails #29

@kkacquah

Description

@kkacquah

When one runs npx create-react-blog react-blog and then cd react-blog and then runs yarn build or npm run build, one sees the following error with the navi-scripts build command

PS C:\Users\aquar> npx create-react-blog react-blog
npx: installed 64 in 4.001s

Creating a new React blog in C:\Users\aquar\react-blog.

Downloading the template.
Installing dependencies. This may take a while...
yarn install v1.21.1
info No lockfile found.
[1/4] Resolving packages...
warning navi-scripts > jsdom > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning netlify-cli > lambda-local > aws-sdk > buffer@4.9.1: This version of 'buffer' is out-of-date. You must update to v4.9.2 or newer
warning netlify-cli > copy-template-dir > readdirp > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
warning netlify-cli > copy-template-dir > readdirp > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
warning react-scripts-mdx > fsevents@2.0.6: Please update: there are crash fixes
warning react-scripts-mdx > jest-environment-jsdom-fourteen > jsdom > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning react-scripts-mdx > webpack-dev-server > chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning react-scripts-mdx > webpack-dev-server > chokidar > fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning react-scripts-mdx > react-dev-utils > fork-ts-checker-webpack-plugin > chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning react-scripts-mdx > babel-jest > @jest/transform > jest-haste-map > fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning react-scripts-mdx > webpack > watchpack > watchpack-chokidar2 > chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning react-scripts-mdx > jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning react-scripts-mdx > jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > left-pad@1.3.0: use String.prototype.padStart()
warning react-scripts-mdx > workbox-webpack-plugin > workbox-build > strip-comments > babel-plugin-transform-object-rest-spread > babel-runtime > core-js@2.6.11: 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.
[2/4] Fetching packages...
info fsevents@2.1.3: The platform "win32" is incompatible with this module.
info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@2.0.6: The platform "win32" is incompatible with this module.
info "fsevents@2.0.6" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@1.2.13: The platform "win32" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "react-scripts-mdx > @typescript-eslint/eslint-plugin > tsutils@3.17.1" 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".
warning "react-scripts-mdx > @typescript-eslint/parser@1.6.0" has unmet peer dependency "typescript@*".
warning "react-scripts-mdx > @typescript-eslint/parser > @typescript-eslint/typescript-estree@1.6.0" has unmet peer dependency "typescript@*".
warning "react-scripts-mdx > @typescript-eslint/eslint-plugin@1.6.0" has unmet peer dependency "typescript@*".
[4/4] Building fresh packages...
success Saved lockfile.
warning Your current version of Yarn is out of date. The latest version is "1.22.4", while you're on "1.21.1".
info To upgrade, download the latest installer at "https://yarnpkg.com/latest.msi".
Done in 31927.62s.

Success! Created react-blog at C:\Users\aquar\react-blog
Inside that directory, you can run several commands:

  yarn start
    Starts the development server.

  yarn build
    Bundles the app into static files for production.

  yarn test
    Starts the test runner.

  yarn deploy and yarn deploy:prod
    Deploys your blog with Netlify.

  yarn eject
    Removes this tool and copies build dependencies, configuration files
    and scripts into the app directory. If you do this, you can’t go back!

We suggest that you begin by typing:

  cd react-blog
  yarn start

Happy hacking!
PS C:\Users\aquar> cd react-blog
PS C:\Users\aquar\react-blog> yarn build
yarn run v1.21.1
$ react-scripts build && navi-scripts build
Creating an optimized production build...
Compiled successfully.

File sizes after gzip:

  91.41 KB  build\static\js\2.41b8e980.chunk.js
  3.9 KB    build\static\js\main.08151767.chunk.js
  2.31 KB   build\static\js\3.f9b958b5.chunk.js
  1.93 KB   build\static\css\main.5bf7b8f9.chunk.css
  1.51 KB   build\static\js\4.6b64b454.chunk.js
  1.47 KB   build\static\js\runtime~main.770a650e.js
  528 B     build\static\js\5.9d4863e4.chunk.js
  345 B     build\static\css\3.dc34d5ba.chunk.css
  284 B     build\static\js\7.74369f15.chunk.js
  256 B     build\static\css\4.397452f9.chunk.css
  214 B     build\static\js\6.4eb0857d.chunk.js
  201 B     build\static\css\5.a4ef864d.chunk.css

The project was built assuming it is hosted at the server root.
You can control this with the homepage field in your package.json.
For example, add this to build it for GitHub Pages:

  "homepage" : "http://myname.github.io/myapp",

The build folder is ready to be deployed.
You may serve it with a static server:

  serve -s build

Find out more about deployment here:

  https://bit.ly/CRA-deploy

navi-scripts: Using config at C:\Users\aquar\react-blog\navi.config.js
[ohshit] An error occured while building your app
Couldn't find window.NaviScripts - did you call register()?
Error: Couldn't find window.NaviScripts - did you call register()?
    at crawl (C:\Users\aquar\react-blog\node_modules\navi-scripts\lib\crawl.js:22:15)
    at build (C:\Users\aquar\react-blog\node_modules\navi-scripts\lib\build.js:9:32)
    at Command.<anonymous> (C:\Users\aquar\react-blog\node_modules\navi-scripts\bin\navi-scripts.js:89:7)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Also I am running

PS C:\Users\aquar\react-blog> node -v
v12.14.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions