Vercel won't build Gatsby site because of missing 404 page - macos

I'm working on a Gatsby site that's hosted on Vercel. It runs fine locally but when I push it to Vercel the build breaks with the error message "error An unexpected error occurred: "https://registry.yarnpkg.com/#user/dom/-/dom-0.0.11.tgz: Request failed \"404 Not Found\"". Full log is included below.
When I first encountered the error, the src/pages/404.js file was indeed missing. So therefore I created it, as a standard functional component, no special features.
When I run the 404-preview from the dev version (localhost:8000/randomstring) it shows up fine. And when I try building it locally gatsby build, it succeeds :
│ └ /something/
└ src/pages/404.js
├ /404/
└ /404.html
I've tried creating new Vercel projects, also from a different account, with the same result. I've not found any other post containing this issue.
Here is the complete build log:
[16:16:00.967] Retrieving list of deployment files...
[16:16:02.582] Downloading 60 deployment files...
[16:16:04.867] Installing build runtime...
[16:16:06.018] Build runtime installed: 1.151s
[16:16:06.063] Installing build runtime...
[16:16:08.203] Build runtime installed: 2.139s
[16:16:09.140] Looking up build cache...
[16:16:09.351] Looking up build cache...
[16:16:09.622] Build Cache not found
[16:16:09.848] Build Cache not found
[16:16:09.957] Detected package.json
[16:16:09.958] Installing dependencies...
[16:16:10.305] yarn install v1.22.17
[16:16:10.437] [1/4] Resolving packages...
[16:16:10.490] Installing dependencies...
[16:16:11.187] [2/4] Fetching packages...
[16:16:13.099] error An unexpected error occurred: "https://registry.yarnpkg.com/#myverceluser/dom/-/dom-0.0.11.tgz: Request failed \"404 Not Found\"".
[16:16:13.100] info If you think this is a bug, please open a bug report with the information provided in "/vercel/path2/yarn-error.log".
[16:16:13.100] info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[16:16:47.226] Error: Command "yarn install" exited with 1
[16:16:47.441] yarn install v1.22.17
[16:16:47.552] [1/4] Resolving packages...
[16:16:48.313] [2/4] Fetching packages...
[16:16:48.946] error An unexpected error occurred: "https://registry.yarnpkg.com/#myverceluser/utils/-/utils-0.0.5.tgz: Request failed \"404 Not Found\"".
[16:16:48.946] info If you think this is a bug, please open a bug report with the information provided in "/vercel/path1/yarn-error.log".
[16:16:48.947] info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[16:16:49.494] Error: Command "yarn install" exited with 1
Any insight would be deeply appreciated. Let me know if I've left some vital information out and I'll add it.
Thanks.

I think it's not that your 404 page is missing - doesn't the framework provide a default?
But rather that it can't fetch this package,
% curl https://registry.yarnpkg.com/#user/dom/-/dom-0.0.11.tgz
{"error":"Not found"}
Is it this https://yarnpkg.com/package/dom? That doesn't have version 0.0.11.

Related

Yarn encounters 404 error installing local and remote packages for specific project folder

I'm encountering the following message when installing packages:
YN0001: │ HTTPError: Response code 404 (Not Found)
at se.<anonymous> (C:\Code\.yarn\releases\yarn-berry.cjs:23:10082)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:93:5)
This happens for both a local package using yarn add ../my-package or remote package (testing using yarn add lodash).
When I'm in another project on the same computer, the package is installed fine. What could be causing this?
This could be that a yarn link has been deleted. When making the symlink using yarn link, a resolutions field is added in package.json. Just having this link however is not adequate.

Getting error: no matching version `^2.0.0` found for package `codec`?

Question
I'm new to Substrate and going through Add a Pallet to Your Runtime. At first, running the command cargo check -p node-template-runtime gave me error
error: failed to parse manifest at `/Users/bashar/work/substrate/start/substrate-node-template/pallets/template/Cargo.toml`
Caused by:
feature `rename-dependency` is required
consider adding `cargo-features = ["rename-dependency"]` to the manifest
I added it and then I started getting this error:
error: no matching version `^2.0.0` found for package `codec`
location searched: registry `https://github.com/rust-lang/crates.io-index`
versions found: 0.0.0
required by package `frame-benchmarking-cli v3.0.0`
... which is depended on by `node-template v3.0.0 (/Users/bashar/work/substrate/start/substrate-node-template/node)`
I tried modifying the codec version to 2.0.1 with no luck. My setup
rustup 1.23.1
rustc 1.50.0
cargo 1.30.0
Any idea what I'm doing wrong?
UPDATE
I went back to the Create Your First Substrate Chain, which this tutorial is built on, started from scratch, which the Pallet tutorial is based on. And this time, after cloning the repository for first tutorial, cargo build --release failed with the same error feature rename-dependency is required.
This built fine the first time before I moved to the second tutorial. Which makes me think maybe a recent Mac update ruined something? I even tried uninstalling Rust and re-installing it, then installing a new template. Same thing

Use yarn global install,An unexpected error occurred: "ENOENT: no such file or directory, chmod '/usr/local/opt/nvm/versions/node/v10.15.0/bin/umi'"

When I use yarn global install packages ,I will see the error "An unexpected error occurred: "ENOENT: no such file or directory, chmod '/usr/local/opt/nvm/versions/node/v10.15.0/bin/umi'". Now,I use nvm to control my node version.
My system is MacOs 10.15.3 and node version is v10.15.0.
Now,I use nvm to control node version.
yarn global add umi
# show error
yarn global v1.22.4
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 🔨 Building fresh packages...
success Installed "umi#3.2.10" with binaries:
- umi
error An unexpected error occurred: "ENOENT: no such file or directory, chmod '/usr/local/opt/nvm/versions/node/v10.15.0/bin/umi'".
info If you think this is a bug, please open a bug report with the information provided in "/Users/jokky/.config/yarn/global/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
I solved this problem.
first ,I open the file .yarnrc.
add next line text
prefix "/path/.config/yarn"
this path is your yarn download path

Yarn error on teamcity build: "Unknown: unknown error, open"

The first step in the TC build process is to run "yarn install" in the directory: D:\TeamCity\Agent\work\MyApp
this is successfull up until: [4/4] Rebuilding all packages...
at which point this error is thrown:
```[Step 1/5] error An unexpected error occurred: "D:\\TeamCity\\Agent\\work\\MyApp\\node_modules\\#babel\\runtime-corejs2\\node_modules\\core-js: UNKNOWN: unknown error, open 'D:\\TeamCity\\Agent\\temp\\buildTmp\\yarn--1592234614361-0.5350564069819825\\yarn'"```
From what I can tell here, its trying to open the temp folder, but cant? or cant find it?
This does not happen consistently. It seems to be random, or whenever there is an extended time between builds. We cannot determine a common pattern. To fix it, we just re-run the build.
We have tried 'yarn install --verbose' and 'yarn install --force' the former showed nothing usefull on output, and --force was a guess at best.
I'm hoping someone can give a bit more context as to exactly what that error might mean.
Screenshot of the error

`npm install` issues/failure with expo-cli and react-native-app

I really need some help with what seems to be the most basic task (setting up the expo/react-native project). I've installed the expo-cli (v3.11.7), react-native (v2.0.1), watchman (v4.9.0) and node (v12.14.1). I've followed the tutorial up until the point where I need to run expo start and I get the following error:
Your project is in SDK version >= 33.0.0, but the expo package version seems to be older.
Error: node_modules directory is missing. Please run npm install in your project directory.
Couldn't start project. Please fix the errors and restart the project.
Set EXPO_DEBUG=true in your env to view the stack trace.
I've then run npm install and tried again but the same error pops up. I've removed the node_modules folder and that didn't work either.
Update:
When I npm install this is the error I'm seeing:
npm WARN deprecated core-js#1.2.7: 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.
npm ERR! code EPROTO
npm ERR! errno EPROTO
npm ERR! request to https://codeload.github.com/expo/react-native/tar.gz/sdk-36.0.0 failed, reason: write EPROTO 4521895360:error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1544:SSL alert number 40
I've installed yarn (v1.21.1) and tried installing using this with the same error:
warning expo > fbemitter > fbjs > core-js#1.2.7: 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.
error An unexpected error occurred: "https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz: write EPROTO 4356277696:error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1544:SSL alert number 40
Can anyone advise?
I've managed to solve the problem. I was trying to install over my home network, which apparently has some proxy restrictions! No idea why.
Someone advised me to try again but connected to another network or my mobile hotspot. I tried this and it worked! Problem solved. So I guess for any others that may be experiencing the same problem, try connecting to another network and see if that helps.
If this fails, then I suppose looking at the proxy configuration and making changes there may help. But I wouldn't advise doing this unless you know exactly what you're doing.

Resources