when deploy in heroku
Run npm audit for details.
> frontend#0.1.0 build
> react-scripts build
Creating an optimized production build...
Failed to compile.
Module not found: Error: Can't resolve './screens/HomeScreen' in '/tmp/build_e399c4d2/frontend/src'
-----> Build failed
We're sorry this build is failing! You can troubleshoot common issues here:
https://devcenter.heroku.com/articles/troubleshooting-node-deploys
Related
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.
I am building an app on CircleCI. I have tried xcodebuild and fastlane scan. After dependencies successfully install, the follow build error occurs.
Testing failed:
Build input file cannot be found: '/Users/distiller/project/node_modules/react-native/React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec-generated.mm'
** TEST FAILED **
[17:53:06]: Exit status: 65
[!] Error building the application. See the log above.
However, if I run the test command locally or SSH into CircleCI, then the build succeeds. What is the problem?
I'm trying to deploy my golang app on Heroku but I get this error:
-----> Running: go install -v -tags heroku -mod=vendor github.com/Burton-kun/app
build github.com/Burton-kun/app: cannot load app/global: open /tmp/build_1971d8d9_/vendor/app/global: no such file or directory
! Push rejected, failed to compile Go app.
! Push failed
I don't understand what's the matter with the packages. Does anybody know how to help me?
When using absolute paths in my CRA, the build step fails on heroku.
NODE_PATH=src/
Is in my .env.local file and also use this env var in my heroku settings.
I try to build my app on heroku using the "heroku-postbuild" script (which just runs "react-scripts build". I am using an express server to serve this build folder and to proxy requests to various API's.
this is the error I get:
remote: Running heroku-postbuild (yarn) remote: yarn run
v1.14.0 remote: $ react-scripts build remote: Creating
an optimized production build... remote: Failed to compile.
remote: remote: ./src/app/App.js remote: Cannot find
module: 'checklist/Checklist'. Make sure this package is installed.
remote: remote: You can install this package by running: yarn
add checklist/Checklist. remote: remote: remote: error Command failed
with exit code 1.
the Checklist.js file is located under: "src/checklist/Checklist.js"
Any idea what I need to do to make this work?
I had this issue and it seemed to be a result of my local file having a different casing than the one committed to git. i.e. if you have a file Checklist.js committed to git and are trying to import checklist from 'checlist/checklist.js', run git mv [...]/checklist.js [...]/Checklist.js.
See this issue comment for the original answer that got me here.
Just create a jsconfig.json file on the root of your project and paste this(if you use src as the starting point for your absolute imports
{
"compilerOptions": {
"baseUrl": "./src"
}
}
I am trying to follow the official tutorial on how to deploy apps on Heroku
I am however getting the following error:
remote: Precompiled aqueduct:aqueduct.
remote: Precompiled test:test.
remote: *** Running pub build
remote: Building with "pub build"
remote: Dart 2 has a new build system. Learn how to migrate from pub build and
remote: pub serve: https://webdev.dartlang.org/dart-2
remote: ! Push rejected, failed to compile Dart app.
I can't seem to find any hints on what I can change to fix the error (It shouldn't really be using pub build or serve. unless aqueduct calls it under the hood)
have a web folder in the root of your project causes the buildpack to try and run 'pub build'