This is the build log. This is the Repository I am trying to build:(https://github.com/Bhavya766/DFUNDS)
[dfunds] [2022-01-21 06:09:38] => Initializing build [dfunds] [2022-01-21 06:09:38] => Retrieving source code to /workspace [dfunds] [2022-01-21 06:09:38] => Selecting branch “main” [dfunds] [2022-01-21 06:09:39] => Checking out commit “14d8b860bdf36c5618b9bdbc21c360cbdc98895c” [dfunds] [2022-01-21 06:09:40] => Got source_dir: / [dfunds] [2022-01-21 06:09:40] => Using workspace root /workspace [dfunds] [2022-01-21 06:09:40] [dfunds] [2022-01-21 06:09:40] => Building app using buildpacks [dfunds] [2022-01-21 06:09:40] => Configuring custom build command to be run at the end of the build: [dfunds] [2022-01-21 06:09:40] npm run build [dfunds] [2022-01-21 06:09:40] => Running buildpack detection [dfunds] [2022-01-21 06:09:40] [dfunds] [2022-01-21 06:09:41] heroku/nodejs-engine 0.5.0 [dfunds] [2022-01-21 06:09:41] digitalocean/node 0.3.4 [dfunds] [2022-01-21 06:09:41] digitalocean/procfile 0.0.3 [dfunds] [2022-01-21 06:09:41] digitalocean/custom 0.1.0 [dfunds] [2022-01-21 06:09:41] [dfunds] [2022-01-21 06:09:41] For documentation on the buildpacks used to build your app, please see: [dfunds] [2022-01-21 06:09:41] Node.js: https://do.co/apps-buildpack-node [dfunds] [2022-01-21 06:09:41] [dfunds] [2022-01-21 06:09:41] => Building app [dfunds] [2022-01-21 06:09:41] [dfunds] [2022-01-21 06:09:41] —> Node.js Buildpack [dfunds] [2022-01-21 06:09:41] —> Installing toolbox [dfunds] [2022-01-21 06:09:41] —> - jq [dfunds] [2022-01-21 06:09:42] —> - yj [dfunds] [2022-01-21 06:09:42] —> Getting Node version [dfunds] [2022-01-21 06:09:42] —> Resolving Node version [dfunds] [2022-01-21 06:09:45] —> Downloading and extracting Node v12.22.9 [dfunds] [2022-01-21 06:10:01] —> Parsing package.json [dfunds] [2022-01-21 06:10:02] —> No file to start server [dfunds] [2022-01-21 06:10:02] —> either use ‘docker run’ to start container or add index.js or server.js [dfunds] [2022-01-21 06:10:02] Project contains package-lock.json, using npm [dfunds] [2022-01-21 06:10:03] Using npm v6.14.15. To configure a different version of npm, set the engines.npm property in package.json. [dfunds] [2022-01-21 06:10:03] See https://do.co/apps-buildpack-node for further instructions. [dfunds] [2022-01-21 06:10:03] Installing node_modules using npm (from package-lock.json) [dfunds] [2022-01-21 06:10:03] Running npm ci [dfunds] [2022-01-21 06:10:03] [dfunds] [2022-01-21 06:10:04] npm ERR! Unexpected token < in JSON at position 92212 [dfunds] [2022-01-21 06:10:04] [dfunds] [2022-01-21 06:10:04] npm ERR! A complete log of this run can be found in: [dfunds] [2022-01-21 06:10:04] npm ERR! /home/apps/.npm/_logs/2022-01-21T06_10_04_691Z-debug.log [dfunds] [2022-01-21 06:10:04] [dfunds] [2022-01-21 06:10:04] unable to invoke layer creator [dfunds] [2022-01-21 06:10:04] installing node_modules: exit status 1 [dfunds] [2022-01-21 06:10:04] ERROR: failed to build: exit status 1 [dfunds] [2022-01-21 06:10:06] [dfunds] [2022-01-21 06:10:06] For documentation on the buildpacks used to build your app, please see: [dfunds] [2022-01-21 06:10:06] Node.js: https://do.co/apps-buildpack-node [dfunds] [2022-01-21 06:10:06] [dfunds] [2022-01-21 06:10:06] ! Build failed (145)
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
It sounds like that the Node.js version that you need is different from the default on on the App platform.
You can customize the Node version used by specifying the version in the engines section of your package.json:
{
"engines": {
"node": "14.x"
}
}
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.