I have a custom-built CKEditor5 in a react application. I downloaded the custom-built CKEditor5 and included it in the source code like the image below.
Package layout
It is working and building locally fine with no problems. However, when I push to amplify, it fails to build
2022-09-23T19:22:53.142Z [INFO]: Creating an optimized production build...
2022-09-23T19:23:16.863Z [INFO]: Failed to compile.
2022-09-23T19:23:16.867Z [INFO]: Module not found: Error: Can't resolve 'ckeditor5-custom-build/build/ckeditor' in '/codebuild/output/src100157020/src/content-writing/src/Components'
2022-09-23T19:23:16.903Z [WARNING]: npm
2022-09-23T19:23:16.904Z [WARNING]: ERR! code ELIFECYCLE
npm ERR! errno 1
2022-09-23T19:23:16.906Z [WARNING]: npm
2022-09-23T19:23:16.906Z [WARNING]: ERR! content-writing#0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the content-writing#0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Any idea what is the issue or how to fix it?
Related
Ive seen a few posts about this but ive been unable to find a solution as of yet. Im trying to create a react.js app with an Amplify backend with graphQL, for whatever reason when i try run my Build on AWS Amplify i get the following error.
2022-05-31T03:56:26.492Z [INFO]: Creating an optimized production build...
2022-05-31T03:56:27.198Z [INFO]: Failed to compile.
2022-05-31T03:56:27.199Z [INFO]: Module not found: Error: Can't resolve './aws-exports' in '/codebuild/output/src520478948/src/my-vet-dental/src'
2022-05-31T03:56:27.210Z [WARNING]: npm
2022-05-31T03:56:27.210Z [WARNING]: ERR! code ELIFECYCLE
npm ERR! errno 1
2022-05-31T03:56:27.212Z [WARNING]: npm
2022-05-31T03:56:27.213Z [WARNING]: ERR! my-vet-dental#0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-vet-dental#0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2022-05-31T03:56:27.220Z [WARNING]:
2022-05-31T03:56:27.220Z [WARNING]: npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-05-31T03_56_27_213Z-debug.log
2022-05-31T03:56:27.220Z [HELP]: Outputting the npm debug log
[object Promise]
2022-05-31T03:56:27.223Z [ERROR]: !!! Build failed
2022-05-31T03:56:27.223Z [ERROR]: !!! Non-Zero Exit Code detected
2022-05-31T03:56:27.223Z [INFO]: # Starting environment caching...
2022-05-31T03:56:27.224Z [INFO]: # Environment caching completed
How do i fix this issue?
This is a react project. I am getting when i try to do npm run build. Have no idea why it suddenly starts behaving this way.
I am using react-router, react-router-dom version 6.2.1 and react-scripts version 5.0.0. So not sure what's the actual issue.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! abc-app build: `node dev/scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the abc-app build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Here is an error (my project works correctly on dev, but when I try to build it, it throws me this error)
> node-react-sample#0.1.0 build /home/acquaint/WORK_DIRECTORY/altr
> node scripts/build.js
Creating an optimized production build...
Failed to compile.
Failed to minify the code from this file:
./node_modules/pdfjs-dist/build/pdf.js:341
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-react-sample#0.1.0 build: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-react-sample#0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Build Failed with this error (check screenshot)
After adding the home, predeploy and deploy values to package.JSON and running npm run deploy, the build folder was created successfully but the build was unable to be published.
I got this error
cloning into 'node_modules\gh-pages\.cache\github.com.okafohenry!birthday-list-keeper-react-app-.git'...
fatal: unable to access https://github.com.okafohenry/birthday-list-keeper-react-app-.git/': Could not resolve host: github.com.okafohenry
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! birthdaylistkeeper#1.0.0 deploy: `gh-pages -d build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the birthdaylistkeeper#1.0.0 deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I have been on this for a while now, how do I fix it?
The url seems to be wrong.
It should be https://github.com/okafohenry/birthday-list-keeper-react-app-.git/
I started a project using 'create-react-app' command and when I do npm run command the command is successfully run but when I use npm build command it fails with the following error everytime.
/usr/local/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js run build --scripts-prepend-node-path=auto
> finteen-web#0.1.0 build /home/jayg/Documents/MyCode/Code/Web/finteen-web
> react-scripts build
Creating an optimized production build...
Failed to compile.
static/js/main.626dbb4b.js from UglifyJs
SyntaxError: Unexpected token: name (length) [/home/jayg/~/punycode/punycode.js:55,0]
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! finteen-web#0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the finteen-web#0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/jayg/.npm/_logs/2019-12-13T17_52_13_422Z-debug.log
Process finished with exit code 1
With create-react-app version:0.9.5
Update your create-react-app version following the CHANGELOG.md of create react app