create-react-blog
create-react-blog copied to clipboard
yarn build fails
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 > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning netlify-cli > lambda-local > aws-sdk > [email protected]: 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 > [email protected]: https://github.com/lydell/resolve-url#deprecated
warning netlify-cli > copy-template-dir > readdirp > micromatch > snapdragon > source-map-resolve > [email protected]: Please see https://github.com/lydell/urix#deprecated
warning react-scripts-mdx > [email protected]: Please update: there are crash fixes
warning react-scripts-mdx > jest-environment-jsdom-fourteen > jsdom > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning react-scripts-mdx > webpack-dev-server > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning react-scripts-mdx > 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-mdx > react-dev-utils > fork-ts-checker-webpack-plugin > [email protected]: 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 > [email protected]: 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 > [email protected]: 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 > [email protected]: 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 > [email protected]: use String.prototype.padStart()
warning react-scripts-mdx > 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.
[2/4] Fetching packages...
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "react-scripts-mdx > @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".
warning "react-scripts-mdx > @typescript-eslint/[email protected]" has unmet peer dependency "typescript@*".
warning "react-scripts-mdx > @typescript-eslint/parser > @typescript-eslint/[email protected]" has unmet peer dependency "typescript@*".
warning "react-scripts-mdx > @typescript-eslint/[email protected]" 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
It's a little late, but I just want to mention that the template is actually from Gatsby. I've just reimplemented it with Navi.
@kkacquah If you're still having a problem please see my guide #30 and let me know if this works for you.