I'm new to react and webpack. Maven seems to be unable to process my css files. Running mvn install has a syntax error unexpected token on the first character of my CSS file. Does it have to do with this warning I'm getting?
[WARNING] npm WARN webpack-cli#2.0.14 requires a peer of webpack#^4.0.0 but none was installed.
I tried updating webpack to that version 4.0.0 but that gave me babel-loader issues. I'm new to tracking down maven dependencies. Can anyone take at my package.json config and maven output? Any help would be appreciated.
Here's my package.json:
{
"name": "misdeal",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^15.3.2",
"react-dom": "^15.3.2",
"rest": "^1.3.1",
"webpack": "^1.12.2"
},
"scripts": {
"watch": "webpack --watch -d"
},
"devDependencies": {
"babel-core": "^6.18.2",
"babel-loader": "^6.2.7",
"babel-polyfill": "^6.16.0",
"babel-preset-es2015": "^6.18.0",
"babel-preset-react": "^6.16.0",
"webpack-cli": "^2.0.14"
}
}
Here's the maven install output:
[INFO] --- frontend-maven-plugin:1.2:install-node-and-npm (install node and npm) # misdeal ---
[INFO] Installing node version v4.4.5
[INFO] Copying node binary from C:\Users\btillinghast\.m2\repository\com\github\eirslett\node\4.4.5\node-4.4.5-win-x64.exe to C:\Users\btillinghast\git\misdeal\target\node\node.exe
[INFO] Installed node locally.
[INFO] Installing npm version 3.9.2
[INFO] Unpacking C:\Users\btillinghast\.m2\repository\com\github\eirslett\npm\3.9.2\npm-3.9.2.tar.gz into C:\Users\btillinghast\git\misdeal\target\node\node_modules
[INFO] Installed npm locally.
[INFO]
[INFO] --- frontend-maven-plugin:1.2:npm (npm install) # misdeal ---
[INFO] Running 'npm install' in C:\Users\btillinghast\git\misdeal
[WARNING] npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
[WARNING] npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.1.3
[WARNING] npm WARN webpack-cli#2.0.14 requires a peer of webpack#^4.0.0 but none was installed.
[INFO]
[INFO] --- frontend-maven-plugin:1.2:webpack (webpack build) # misdeal ---
[INFO] Running 'webpack.js ' in C:\Users\btillinghast\git\misdeal
[INFO] Hash: 6c98a449ae4f6374613a
[INFO] Version: webpack 1.15.0
[INFO] Time: 1332ms
[INFO] Asset Size Chunks Chunk Names
[INFO] ./src/main/resources/static/built/bundle.js 756 kB 0 [emitted] main
[INFO] ./src/main/resources/static/built/bundle.js.map 880 kB 0 [emitted] main
[INFO] + 187 hidden modules
[INFO]
[INFO] ERROR in ./src/main/resources/static/App.css
[INFO] Module build failed: SyntaxError: C:/Users/btillinghast/git/misdeal/src/main/resources/static/App.css: Unexpected token (1:0)
[INFO]
[INFO] > 1 | .App {
[INFO] | ^
[INFO] 2 | text-align: center;
[INFO] 3 | }
[INFO] 4 |
[INFO]
[INFO] # ./src/main/js/containers/App.js 13:0-41
You need to update Webpack, the version you have is outdated, the current version is 4.5.0 the version you have installed is 1.12.2 and Webpack CLI requires at least version 4.0.0
Try npm update -g webpack
If that does not work
Try npm install --save-dev webpack
or with Yarn
Try yarn add webpack --dev
Related
Been at it for two days and stumped.. tried every solution I can find on stackoverflow.
Trying to deploy my MERN stack app with tailwind on Heroku. It seems Craco/tailwind is giving me problem.
Any help please?
"(node:2326) UnhandledPromiseRejectionWarning: Error: Cannot find module 'tailwindcss'
Require stack:
/tmp/build_1f05e363/frontend/craco.config.js
/tmp/build_1f05e363/frontend/node_modules/#craco/craco/lib/config.js
/tmp/build_1f05e363/frontend/node_modules/#craco/craco/scripts/build.js
"
Error build log posted below
`
-----> Building on the Heroku-20 stack
-----> Using buildpack: mars/create-react-app
-----> React.js (create-react-app) multi app detected
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-multi.git
=====> Detected Framework: Multipack
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-nodejs.git
=====> Detected Framework: Node.js
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): 14.17.5
engines.npm (package.json): unspecified (use default)
Resolving node version 14.17.5...
Downloading and installing node 14.17.5...
Using default npm version: 6.14.14
-----> Restoring cache
Cached directories were not restored due to a change in version of node, npm, yarn or stack
Module installation may take longer for this build
-----> Installing dependencies
Installing node modules
> nodemon#2.0.12 postinstall /tmp/build_1f05e363/node_modules/nodemon
> node bin/postinstall || exit 0
Love nodemon? You can now support the project via the open collective:
> https://opencollective.com/nodemon/donate
added 269 packages in 8.641s
-----> Build
Running heroku-postbuild
> react-ecommerce#1.0.0 heroku-postbuild /tmp/build_1f05e363
> NPM_CONFIG_PRODUCTION=false npm install --prefix frontend && npm run build --prefix frontend
> core-js#2.6.12 postinstall /tmp/build_1f05e363/frontend/node_modules/babel-runtime/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
> core-js#3.16.3 postinstall /tmp/build_1f05e363/frontend/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
> core-js-pure#3.16.3 postinstall /tmp/build_1f05e363/frontend/node_modules/core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"
> ejs#2.7.4 postinstall /tmp/build_1f05e363/frontend/node_modules/ejs
> node ./postinstall.js
added 1991 packages from 811 contributors in 51.631s
150 packages are looking for funding
run `npm fund` for details
> frontend#0.1.0 build /tmp/build_1f05e363/frontend
> craco build
`
(node:2326) UnhandledPromiseRejectionWarning: Error: Cannot find module 'tailwindcss'
Require stack:
- /tmp/build_1f05e363/frontend/craco.config.js
- /tmp/build_1f05e363/frontend/node_modules/#craco/craco/lib/config.js
- /tmp/build_1f05e363/frontend/node_modules/#craco/craco/scripts/build.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
at Function.Module._load (internal/modules/cjs/loader.js:745:27)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (/tmp/build_1f05e363/frontend/craco.config.js:6:11)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Module.require (internal/modules/cjs/loader.js:961:19)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:2326) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:2326) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
`
-----> Caching build
- node_modules
-----> Pruning devDependencies
audited 269 packages in 2.577s
22 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
-----> Build succeeded!
=====> Downloading Buildpack: https://github.com/mars/create-react-app-inner-buildpack.git#v9.0.0
=====> Detected Framework: React.js (create-react-app)
Writing `static.json` to support create-react-app
Enabling runtime environment variables
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-static.git
=====> Detected Framework: Static HTML
-----> Installed nginx 1.19.0 to /app/bin
Using release configuration from last framework (Static HTML).
-----> Discovering process types
Procfile declares types -> web
-----> Compressing...
Done: 103.2M
-----> Launching...
Released v20
`
{
"name": "frontend",
"proxy": "http://127.0.0.1:5000",
"version": "0.1.0",
"private": true,
"dependencies": {
"#craco/craco": "^6.2.0",
"#testing-library/jest-dom": "^5.14.1",
"#testing-library/react": "^11.2.7",
"#testing-library/user-event": "^12.8.3",
"axios": "^0.21.1",
"react": "^17.0.2",
"react-bootstrap": "^1.6.1",
"react-dom": "^17.0.2",
"react-paypal-button-v2": "^2.6.3",
"react-redux": "^7.2.5",
"react-router-dom": "^5.2.1",
"react-scripts": "4.0.3",
"redux": "^4.1.1",
"redux-devtools-extension": "^2.13.9",
"redux-thunk": "^2.3.0",
"web-vitals": "^1.1.2"
},
"scripts": {
"start": "craco start",
"build": "craco build",
"test": "craco test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"autoprefixer": "^9.8.7",
"postcss": "^7.0.38",
"tailwindcss": "npm:#tailwindcss/postcss7-compat#^2.2.16"
}
}
I've tried uninstalling tailwind/postcss/autoprefixer and re-installing it to dependencies and in that case, the build will still not complete with a Craco build error.
I'm stumped been trying to fix this for 8 hours..
If I bash into my heroku app:
` Running bash on ⬢ appName123... up, run.4756 (Free)
~ $ dir
Procfile README.md backend frontend node_modules package-lock.json package.json
~ $ cd backend
~/backend $ dir
config controller data middleware models routes seeder.js server.js utils
~/backend $ cd ..
~ $ cd frontend
~/frontend $ dir
craco.config.js node_modules package-lock.json package.json public src tailwind.config.js
~/frontend $ exit
exit
`
No build folder.
I try to install manually:
`~/frontend $ npm run build
> frontend#0.1.0 build /app/frontend
> craco build
(node:81) UnhandledPromiseRejectionWarning: Error: Cannot find module 'tailwindcss'
Require stack:
- /app/frontend/craco.config.js
- /app/frontend/node_modules/#craco/craco/lib/config.js
- /app/frontend/node_modules/#craco/craco/scripts/build.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
at Function.Module._load (internal/modules/cjs/loader.js:745:27)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (/app/frontend/craco.config.js:6:11)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Module.require (internal/modules/cjs/loader.js:961:19)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:81) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:81) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.`
Same error.. unable to build.
Tailwind however will work locally no matter if its a regular or dev dependency and craco build runs fine every time. It's just deployment in Heroku thats causing a problem.
I've specified Node version, updated my build pack to mars create-react-app.... nothing else left to try
package.json in root folder for backend server
{
"name": "react-ecommerce",
"engines": {
"node": "14.17.5"
},
"version": "1.0.0",
"description": "MERN ecommerce shop",
"main": "server.js",
"dependencies": {
"bcryptjs": "^2.4.3",
"concurrently": "^6.2.1",
"dotenv": "^10.0.0",
"express": "^4.17.1",
"express-async-handler": "^1.1.4",
"jsonwebtoken": "^8.5.1",
"mongoose": "^6.0.4",
"nodemon": "^2.0.12"
},
"devDependencies": {},
"scripts": {
"server": "nodemon backend/server",
"client": "npm start --prefix frontend",
"start": "node backend/server",
"dev": "concurrently \"npm run server \" \"npm run client \"",
"data:import": "node backend/seeder",
"data:delete": "node backend/seeder -d",
"heroku-postbuild": "NPM_CONFIG_PRODUCTION=false npm install --prefix frontend && npm run build --prefix frontend"
}
}
Once again, everything works locally. Even when booting up in production mode without craco run. So path seems to be fine. It's the build in Heroku will fail
Any help?
Try moving the 'tailwindcss' module to the dependencies instead to the dev dependencies.
Yep, had the same issue on my VPS, resolved it by deleting them and installing again:
npm uninstall tailwindcss postcss autoprefixer
npm install tailwindcss#npm:#tailwindcss/postcss7-compat postcss#^7 autoprefixer#^9
Making my own project (https://github.com/770001/buyer) based on https://blogg.kantega.no/webapp-with-create-react-app-and-spring-boot/. After deploying to heroku, I get 404 when the application starts, but the rest controller does not work. I can't figure out why. I fight for several days!
P.S. if I deploy the application following this tutorial, everything works. I don't understand why I have 404.
I tried the same thing with another tutorial - https://hackernoon.com/package-your-react-app-with-spring-boot-a-how-to-guide-cdfm329w - if you deploy it to heroku, everything works. But when I create my (identical) - 404.
Everything works for a localhost. I do via maven jar, run it via java -jar target / <name jar file> then run react via cd frontend, yarn start. Everything is working.
What am I doing wrong?
UPDATE
I added to the root folder of the application Procfile:
web java -Dserver.port=$PORT $JAVA_OPTS -jar target/shmot-0.0.1-SNAPSHOT.war
This is my package.json
{
"name": "front",
"version": "0.1.0",
"private": true,
"dependencies": {
"#testing-library/jest-dom": "^5.11.8",
"#testing-library/react": "^11.2.3",
"#testing-library/user-event": "^12.6.0",
"http-proxy-middleware": "^1.0.6",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-scripts": "4.0.1",
"web-vitals": "^0.2.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
This is my pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.1</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.khilkevichigor</groupId>
<artifactId>shmot</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>shmot</name>
<description>International shopping</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.6</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.6</version>
<configuration>
<workingDirectory>front</workingDirectory>
<installDirectory>target</installDirectory>
</configuration>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>v12.16.3</nodeVersion>
<npmVersion>6.14.4</npmVersion>
</configuration>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>npm run build</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>generate-resources</phase>
<configuration>
<target>
<copy todir="${project.build.directory}/classes/public">
<fileset dir="${project.basedir}/front/build"/>
</copy>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
This is Build Log from heroku:
-----> Building on the Heroku-20 stack
-----> Java app detected
-----> Installing JDK 1.8... done
-----> Executing Maven
$ ./mvnw -DskipTests clean dependency:list install
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< com.khilkevichigor:shmot >----------------------
[INFO] Building shmot 0.0.1-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) # shmot ---
[INFO]
[INFO] --- maven-dependency-plugin:3.1.2:list (default-cli) # shmot ---
[INFO]
[INFO] --- frontend-maven-plugin:1.6:install-node-and-npm (install node and npm) # shmot ---
[INFO] Installing node version v12.16.3
[INFO] Unpacking /tmp/codon/tmp/cache/.m2/repository/com/github/eirslett/node/12.16.3/node-12.16.3-linux-x64.tar.gz into /tmp/build_ab545a20_/target/node/tmp
[INFO] Copying node binary from /tmp/build_ab545a20_/target/node/tmp/node-v12.16.3-linux-x64/bin/node to /tmp/build_ab545a20_/target/node/node
[INFO] Installed node locally.
[INFO] Installing npm version 6.14.4
[INFO] Unpacking /tmp/codon/tmp/cache/.m2/repository/com/github/eirslett/npm/6.14.4/npm-6.14.4.tar.gz into /tmp/build_ab545a20_/target/node/node_modules
[INFO] Installed npm locally.
[INFO]
[INFO] --- frontend-maven-plugin:1.6:npm (npm install) # shmot ---
[INFO] Running 'npm install' in /tmp/build_ab545a20_/front
[INFO]
[INFO] > core-js#2.6.12 postinstall /tmp/build_ab545a20_/front/node_modules/babel-runtime/node_modules/core-js
[INFO] > node -e "try{require('./postinstall')}catch(e){}"
[INFO]
[INFO] Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
[INFO]
[INFO] The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
[INFO] > https://opencollective.com/core-js
[INFO] > https://www.patreon.com/zloirock
[INFO]
[INFO] Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
[INFO]
[INFO]
[INFO] > core-js#3.8.2 postinstall /tmp/build_ab545a20_/front/node_modules/core-js
[INFO] > node -e "try{require('./postinstall')}catch(e){}"
[INFO]
[INFO]
[INFO] > core-js-pure#3.8.2 postinstall /tmp/build_ab545a20_/front/node_modules/core-js-pure
[INFO] > node -e "try{require('./postinstall')}catch(e){}"
[INFO]
[INFO]
[INFO] > ejs#2.7.4 postinstall /tmp/build_ab545a20_/front/node_modules/ejs
[INFO] > node ./postinstall.js
[INFO]
[INFO] Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
[INFO]
[WARNING] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.13 (node_modules/webpack-dev-server/node_modules/fsevents):
[WARNING] npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
[WARNING] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents):
[WARNING] npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
[WARNING] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.3.1 (node_modules/fsevents):
[WARNING] npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.3.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
[ERROR]
[INFO] added 1926 packages from 760 contributors and audited 1929 packages in 45.11s
[INFO]
[INFO] 126 packages are looking for funding
[INFO] run `npm fund` for details
[INFO]
[INFO] found 0 vulnerabilities
[INFO]
[INFO]
[INFO] --- frontend-maven-plugin:1.6:npm (npm run build) # shmot ---
[INFO] Running 'npm run build' in /tmp/build_ab545a20_/front
[INFO]
[INFO] > front#0.1.0 build /tmp/build_ab545a20_/front
[INFO] > react-scripts build
[INFO]
[INFO] Creating an optimized production build...
[INFO] Compiled successfully.
[INFO]
[INFO] File sizes after gzip:
[INFO]
[INFO] 41.69 KB build/static/js/2.25b2f903.chunk.js
[INFO] 1.39 KB build/static/js/3.5c32b29a.chunk.js
[INFO] 1.16 KB build/static/js/runtime-main.f423ac52.js
[INFO] 802 B build/static/js/main.529d8860.chunk.js
[INFO] 531 B build/static/css/main.8c8b27cf.chunk.css
[INFO]
[INFO] The project was built assuming it is hosted at /.
[INFO] You can control this with the homepage field in your package.json.
[INFO]
[INFO] The build folder is ready to be deployed.
[INFO] You may serve it with a static server:
[INFO]
[INFO] npm install -g serve
[INFO] serve -s build
[INFO]
[INFO] Find out more about deployment here:
[INFO]
[INFO] https://cra.link/deployment
[INFO]
[INFO]
[INFO] --- maven-antrun-plugin:1.8:run (default) # shmot ---
[INFO] Executing tasks
main:
[copy] Copying 19 files to /tmp/build_ab545a20_/target/classes/public
[INFO] Executed tasks
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) # shmot ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO] The encoding used to copy filtered properties files have not been set. This means that the same encoding will be used to copy filtered properties files as when copying other filtered resources. This might not be what you want! Run your build with --debug to see which files might be affected. Read more at https://maven.apache.org/plugins/maven-resources-plugin/examples/filtering-properties-files.html
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) # shmot ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 15 source files to /tmp/build_ab545a20_/target/classes
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) # shmot ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] skip non existing resourceDirectory /tmp/build_ab545a20_/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) # shmot ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /tmp/build_ab545a20_/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) # shmot ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-war-plugin:3.3.1:war (default-war) # shmot ---
[INFO] Packaging webapp
[INFO] Assembling webapp [shmot] in [/tmp/build_ab545a20_/target/shmot-0.0.1-SNAPSHOT]
[INFO] Processing war project
[INFO] Building war: /tmp/build_ab545a20_/target/shmot-0.0.1-SNAPSHOT.war
[INFO]
[INFO] --- spring-boot-maven-plugin:2.4.1:repackage (repackage) # shmot ---
[INFO] Replacing main artifact with repackaged archive
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) # shmot ---
[INFO] Installing /tmp/build_ab545a20_/target/shmot-0.0.1-SNAPSHOT.war to /tmp/codon/tmp/cache/.m2/repository/com/khilkevichigor/shmot/0.0.1-SNAPSHOT/shmot-0.0.1-SNAPSHOT.war
[INFO] Installing /tmp/build_ab545a20_/pom.xml to /tmp/codon/tmp/cache/.m2/repository/com/khilkevichigor/shmot/0.0.1-SNAPSHOT/shmot-0.0.1-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:14 min
[INFO] Finished at: 2021-01-13T07:33:38Z
[INFO] ------------------------------------------------------------------------
-----> Discovering process types
Procfile declares types -> web
-----> Compressing...
Done: 221.8M
-----> Launching...
Released v22
https://shmoting.herokuapp.com/ deployed to Heroku
This is application logs from heroku:
2021-01-13T07:32:15.000000+00:00 app[api]: Build started by user khilkevichigor#gmail.com
2021-01-13T07:34:01.911760+00:00 app[api]: Deploy 1a70b985 by user khilkevichigor#gmail.com
2021-01-13T07:34:01.911760+00:00 app[api]: Release v22 created by user khilkevichigor#gmail.com
2021-01-13T07:34:03.105197+00:00 heroku[web.1]: State changed from crashed to starting
2021-01-13T07:34:12.000000+00:00 app[api]: Build succeeded
2021-01-13T07:34:24.571031+00:00 heroku[web.1]: Starting process with command `java -Dserver.port=49823 $JAVA_OPTS -jar target/shmot-0.0.1-SNAPSHOT.war`
2021-01-13T07:34:27.415308+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
2021-01-13T07:34:27.420758+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Xmx300m -Xss512k -XX:CICompilerCount=2 -Dfile.encoding=UTF-8
2021-01-13T07:34:30.011053+00:00 app[web.1]:
2021-01-13T07:34:30.011193+00:00 app[web.1]: . ____ _ __ _ _
2021-01-13T07:34:30.011284+00:00 app[web.1]: /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
2021-01-13T07:34:30.011383+00:00 app[web.1]: ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
2021-01-13T07:34:30.011477+00:00 app[web.1]: \\/ ___)| |_)| | | | | || (_| | ) ) ) )
2021-01-13T07:34:30.011570+00:00 app[web.1]: ' |____| .__|_| |_|_| |_\__, | / / / /
2021-01-13T07:34:30.011668+00:00 app[web.1]: =========|_|==============|___/=/_/_/_/
2021-01-13T07:34:30.013324+00:00 app[web.1]: :: Spring Boot :: (v2.4.1)
2021-01-13T07:34:30.013382+00:00 app[web.1]:
2021-01-13T07:34:30.433585+00:00 app[web.1]: 2021-01-13 07:34:30.428 INFO 4 --- [ main] c.khilkevichigor.shmot.ShmotApplication : Starting ShmotApplication v0.0.1-SNAPSHOT using Java 1.8.0_275-heroku on affa4dd6-bc17-41aa-b83b-7290ef507210 with PID 4 (/app/target/shmot-0.0.1-SNAPSHOT.war started by u5738 in /app)
2021-01-13T07:34:30.436511+00:00 app[web.1]: 2021-01-13 07:34:30.436 INFO 4 --- [ main] c.khilkevichigor.shmot.ShmotApplication : No active profile set, falling back to default profiles: default
2021-01-13T07:34:34.414783+00:00 app[web.1]: 2021-01-13 07:34:34.414 INFO 4 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2021-01-13T07:34:34.670946+00:00 app[web.1]: 2021-01-13 07:34:34.670 INFO 4 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 223 ms. Found 2 JPA repository interfaces.
2021-01-13T07:34:37.245660+00:00 app[web.1]: 2021-01-13 07:34:37.244 INFO 4 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 49823 (http)
2021-01-13T07:34:37.288439+00:00 app[web.1]: 2021-01-13 07:34:37.288 INFO 4 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2021-01-13T07:34:37.288893+00:00 app[web.1]: 2021-01-13 07:34:37.288 INFO 4 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.41]
2021-01-13T07:34:39.683441+00:00 app[web.1]: 2021-01-13 07:34:39.683 INFO 4 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2021-01-13T07:34:39.683661+00:00 app[web.1]: 2021-01-13 07:34:39.683 INFO 4 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 8934 ms
2021-01-13T07:34:40.337172+00:00 app[web.1]: 2021-01-13 07:34:40.334 INFO 4 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2021-01-13T07:34:40.486708+00:00 app[web.1]: 2021-01-13 07:34:40.485 INFO 4 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4.25.Final
2021-01-13T07:34:41.135637+00:00 app[web.1]: 2021-01-13 07:34:41.135 INFO 4 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2021-01-13T07:34:41.407961+00:00 app[web.1]: 2021-01-13 07:34:41.407 INFO 4 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2021-01-13T07:34:42.079667+00:00 app[web.1]: 2021-01-13 07:34:42.079 INFO 4 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2021-01-13T07:34:42.171030+00:00 app[web.1]: 2021-01-13 07:34:42.170 INFO 4 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL10Dialect
2021-01-13T07:34:43.969250+00:00 app[web.1]: 2021-01-13 07:34:43.968 INFO 4 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2021-01-13T07:34:43.987686+00:00 app[web.1]: 2021-01-13 07:34:43.987 INFO 4 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2021-01-13T07:34:45.065217+00:00 app[web.1]: 2021-01-13 07:34:45.064 WARN 4 --- [ main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2021-01-13T07:34:47.509625+00:00 app[web.1]: 2021-01-13 07:34:47.507 INFO 4 --- [ main] o.s.s.web.DefaultSecurityFilterChain : Will secure any request with [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#235a0c16, org.springframework.security.web.context.SecurityContextPersistenceFilter#3401a114, org.springframework.security.web.header.HeaderWriterFilter#73173f63, org.springframework.security.web.authentication.logout.LogoutFilter#319bc845, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#5e8ac0e1, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#4233e892, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#58ffcbd7, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#2b5f4d54, org.springframework.security.web.session.SessionManagementFilter#655ef322, org.springframework.security.web.access.ExceptionTranslationFilter#25e2ab5a, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#37ddb69a]
2021-01-13T07:34:47.944922+00:00 app[web.1]: 2021-01-13 07:34:47.944 INFO 4 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2021-01-13T07:34:48.163350+00:00 app[web.1]: 2021-01-13 07:34:48.163 INFO 4 --- [ main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: class path resource [public/index.html]
2021-01-13T07:34:48.933082+00:00 heroku[web.1]: State changed from starting to up
2021-01-13T07:34:48.717965+00:00 app[web.1]: 2021-01-13 07:34:48.716 INFO 4 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 49823 (http) with context path ''
2021-01-13T07:34:48.745993+00:00 app[web.1]: 2021-01-13 07:34:48.745 INFO 4 --- [ main] c.khilkevichigor.shmot.ShmotApplication : Started ShmotApplication in 19.827 seconds (JVM running for 21.325)
It feels like React isn't working!
Not exactly sure what is taking so long for npm to install on my EC2 instance, but here's the log output:
----------------------------------------
/var/log/eb-engine.log
----------------------------------------
2020/10/10 00:43:19.430098 [INFO] Downloading: bucket: elasticbeanstalk-us-east-1-665496786822,object: /resources/environments/e-779g33dt9k/_runtime/versions/manifest_1602290543372
2020/10/10 00:43:19.636192 [INFO] Download successful243bytes downloaded
2020/10/10 00:43:19.636422 [INFO] Trying to read and parse version manifest...
2020/10/10 00:43:19.636595 [INFO] Executing instruction: stopSqsd
2020/10/10 00:43:19.636602 [INFO] This is a web server environment instance, skip stop sqsd daemon...
2020/10/10 00:43:19.636606 [INFO] Executing instruction: StageApplication
2020/10/10 00:44:03.357499 [INFO] extracting
/opt/elasticbeanstalk/deployment/app_source_bundleto/var/app/staging/
2020/10/10 00:44:03.357569 [INFO] Running command /bin/sh -c /usr/bin/unzip -q -o
/opt/elasticbeanstalk/deployment/app_source_bundle -d /var/app/staging/
2020/10/10 00:44:03.972792 [INFO] finished extracting
/opt/elasticbeanstalk/deployment/app_source_bundle to /var/app/staging/ successfully
2020/10/10 00:44:03.973892 [INFO] Executing instruction: RunConfigDeployPreBuildHooks
2020/10/10 00:44:03.973905 [WARN] skipping hooks scripts under /opt/elasticbeanstalk/hooks/
2020/10/10 00:44:03.973917 [INFO] The dir .platform/confighooks/prebuild/ does not exist in the
application. Skipping this step...
2020/10/10 00:44:03.973922 [INFO] Executing instruction: Install customer specified node.js version
2020/10/10 00:44:03.973927 [INFO] installing specified nodejs version...
2020/10/10 00:44:03.974861 [INFO] validate the node.js version specified by customer...
2020/10/10 00:44:03.974877 [INFO] Nodejs 12.16.1 has already been installed, skipping
2020/10/10 00:44:03.974882 [INFO] Executing instruction: Use NPM to install dependencies
2020/10/10 00:44:03.974895 [INFO] use npm to install dependencies
2020/10/10 00:44:03.974932 [INFO] Running command /bin/sh -c npm config set jobs 1
2020/10/10 00:44:10.557446 [INFO] Running command /bin/sh -c npm --production install
2020/10/10 00:59:11.436998 [ERROR] An error occurred during execution of command [config-deploy] -
[Use NPM to install dependencies]. Stop running the command. Error: Command /bin/sh -c npm --
production install failed with error Command timed out after 900 seconds
I'm using the full CodePipeline, here is my buildspec.yml (spacing abbreviated):
# Buildspec version
version: 0.2
frontend:
phases:
preBuild:
commands:
- echo Installing NPM dependencies...
- npm ci
build:
commands:
- npm run-script build
artifacts:
baseDirectory: build
files:
- '**/*'
cache:
paths:
This should output a directory build for CodeDeploy, which uses this appspec.yml:
version: 0.0
os: linux
files:
- source: /
destination: /var/app/current
Turns out that Beanstalk likes to try to do things its own way, and I have it set to the Nodejs platform so it is going to try to run npm install and npm start at all costs.
I ended up disabling it through not including my package.json or package lock files in CodeBuild's artifact. This at least stopped it from trying to run its own NPM install. Not exactly efficient and I port all my node_modules over but it is zipped as an artifact from CodeBuild and sent to Beanstalk for deployment.
i am trying to deploy it now, the app works great on localhost, no problems at all but when i deploy it to netlify from github it crashes by giving me these errors in developers console.
init # include.preload.js:442
(index):1 Mixed Content: The page at 'https://5cfc2538a4fc311e18e72538--brave-poincare-d969b9.netlify.com/' was loaded over HTTPS, but requested an insecure stylesheet 'http://video-react.js.org/assets/video-react.css'. This request has been blocked; the content must be served over HTTPS.
2.0370c799.chunk.js:1 Uncaught SyntaxError: Unexpected token <
main.dbd098f2.chunk.js:1 Uncaught SyntaxError: Unexpected token <
include.preload.js:442 [Deprecation] Element.createShadowRoot is deprecated and will be removed in M73, around March 2019. Please use Element.attachShadow instead. See https://www.chromestatus.com/features/4507242028072960 for more details.
init # include.preload.js:442
include.preload.js:442 [Deprecation] Element.createShadowRoot is deprecated and will be removed in M73, around March 2019. Please use Element.attachShadow instead. See https://www.chromestatus.com/features/4507242028072960 for more details.
init # include.preload.js:442
manifest.json:1 Manifest: Line: 1, column: 1, Unexpected token.
(index):1 Mixed Content: The page at 'https://5cfc2538a4fc311e18e72538--brave-poincare-d969b9.netlify.com/' was loaded over HTTPS, but requested an insecure stylesheet 'http://video-react.js.org/assets/video-react.css'. This request has been blocked; the content must be served over HTTPS.
it was not being able to install node-pre-gyp module before, but i fixed it but now it gets deployed but doesn't work
complete log of netlify deployement:
5:14:32 PM: Build ready to start
5:14:34 PM: build-image version: 9e0f207a27642d0115b1ca97cd5e8cebbe492f63
5:14:34 PM: build-image tag: v3.3.2
5:14:34 PM: buildbot version: 75cd99f62ada9e21edea53208e8baf0eab85a045
5:14:35 PM: Fetching cached dependencies
5:14:35 PM: Failed to fetch cache, continuing with build
5:14:35 PM: Starting to prepare the repo for build
5:14:35 PM: No cached dependencies found. Cloning fresh repo
5:14:35 PM: git clone https://github.com/Phyxable/app-jun-07
5:14:50 PM: Preparing Git Reference refs/heads/master
5:14:51 PM: Starting build script
5:14:51 PM: Installing dependencies
5:14:53 PM: Downloading and installing node v10.16.0...
5:14:53 PM: Downloading https://nodejs.org/dist/v10.16.0/node-v10.16.0-linux-x64.tar.xz...
5:14:53 PM:
#######
5:14:53 PM: 11.0%
5:14:53 PM:
###############################################################
5:14:53 PM: ### 91.8%
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: ################
5:14:54 PM: ########################################## 100.0%
5:14:54 PM: Computing checksum with sha256sum
5:14:54 PM: Checksums matched!
5:14:56 PM: Now using node v10.16.0 (npm v6.9.0)
5:14:57 PM: Attempting ruby version 2.6.2, read from environment
5:14:58 PM: Using ruby version 2.6.2
5:14:58 PM: Using PHP version 5.6
5:14:58 PM: Started restoring cached node modules
5:15:00 PM: Finished restoring cached node modules
5:15:00 PM: Installing NPM modules using NPM version 6.9.0
5:15:33 PM: > grpc#1.20.3 install /opt/build/repo/node_modules/grpc
5:15:33 PM: > node-pre-gyp install --fallback-to-build --library=static_library
5:15:33 PM: node-pre-gyp
5:15:33 PM: WARN
5:15:33 PM: Using request for node-pre-gyp https download
5:15:34 PM: [grpc] Success: "/opt/build/repo/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node" is installed via remote
5:15:34 PM: > core-js-pure#3.1.3 postinstall /opt/build/repo/node_modules/core-js-pure
5:15:34 PM: > node scripts/postinstall || echo "ignore"
5:15:34 PM: Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
5:15:34 PM: The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
5:15:34 PM: > https://opencollective.com/core-js
5:15:34 PM: > https://www.patreon.com/zloirock
5:15:34 PM: Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
5:15:34 PM: > protobufjs#6.8.8 postinstall /opt/build/repo/node_modules/protobufjs
5:15:34 PM: > node scripts/postinstall
5:15:35 PM: > jss#9.8.7 postinstall /opt/build/repo/node_modules/jss
5:15:35 PM: > node -e "console.log('\u001b[35m\u001b[1mLove JSS? You can now support us on open collective:\u001b[22m\u001b[39m\n > \u001b[34mhttps://opencollective.com/jss/donate\u001b[0m')"
5:15:35 PM: Love JSS? You can now support us on open collective:
5:15:35 PM: > https://opencollective.com/jss/donate
5:15:35 PM: > firebase-functions#2.3.1 postinstall /opt/build/repo/node_modules/firebase-functions
5:15:35 PM: > node ./upgrade-warning
5:15:35 PM: ======== WARNING! ========
5:15:35 PM: This upgrade of firebase-functions contains breaking changes if you are upgrading from a version below v1.0.0.
5:15:35 PM: To see a complete list of these breaking changes, please go to:
5:15:35 PM: https://firebase.google.com/docs/functions/beta-v1-diff
5:15:37 PM: npm WARN
5:15:37 PM: optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules/jest-haste-map/node_modules/fsevents):
5:15:37 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
5:15:37 PM: npm WARN
5:15:37 PM: optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules/chokidar/node_modules/fsevents):
5:15:37 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
5:15:37 PM: npm
5:15:37 PM: WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.0.6 (node_modules/fsevents):
5:15:37 PM: npm
5:15:37 PM: WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.0.6: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
5:15:37 PM: added 1849 packages from 1018 contributors and audited 890418 packages in 35.912s
5:15:37 PM: found 0 vulnerabilities
5:15:37 PM: NPM modules installed
5:15:37 PM: Started restoring cached go cache
5:15:37 PM: Finished restoring cached go cache
5:15:38 PM: unset GOOS;
5:15:38 PM: unset GOARCH;
5:15:38 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
5:15:38 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
5:15:38 PM: go version >&2;
5:15:38 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
5:15:38 PM: go version go1.12 linux/amd64
5:15:38 PM: Installing missing commands
5:15:38 PM: Verify run directory
5:15:38 PM: Executing user command: npm run build
5:15:38 PM: > finalphyx#0.1.0 build /opt/build/repo
5:15:38 PM: > react-scripts build && echo '/* /index.html 200' > build/_redirects
5:15:39 PM: Creating an optimized production build...
5:16:15 PM: Compiled with warnings.
5:16:15 PM: ./src/Components/App/index.js
5:16:15 PM: Line 13: 'FourZeroFourPage' is defined but never used no-unused-vars
5:16:15 PM: Line 15: 'Switch' is defined but never used no-unused-vars
5:16:15 PM: ./src/Pages/SubscribePage/index.jsx
manifest.json:
{
"short_name": "Phyxable",
"name": "Phyxable",
"icons": [
{
"src": "/images/icon-192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "/images/icon-512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"background_color": "#3367D6",
"display": "standalone",
"scope": "/",
"theme_color": "#3367D6"
}
package.json :
{
"name": "finalphyx",
"version": "0.1.0",
"private": true,
"dependencies": {
"#material-ui/lab": "^3.0.0-alpha.30",
"disable-scroll": "^0.4.1",
"firebase": "^6.1.1",
"firebase-functions": "^2.3.1",
"html-loader": "^0.5.5",
"mdbreact": "^4.15.0",
"netlify": "^2.4.6",
"react": "^16.8.6",
"react-bootstrap": "^0.32.4",
"react-div-100vh": "^0.3.4",
"react-dom": "^16.8.6",
"react-firebaseui": "^3.1.2",
"react-ga": "^2.5.7",
"react-jw-player": "^1.19.0",
"react-meta-tags": "^0.7.4",
"react-password-mask": "^3.3.1",
"react-player": "^1.11.0",
"react-responsive": "^7.0.0",
"react-router-dom": "^5.0.1",
"react-scripts": "^3.0.1",
"react-scroll": "^1.7.11",
"react-share": "^3.0.0",
"react-stripe-checkout": "^2.6.3",
"react-stripe-elements": "^3.0.0",
"recompose": "^0.30.0",
"stripe": "^7.1.0",
"video-react": "^0.13.7",
"waypoints": "^4.0.1",
"window-scroll-manager": "^1.1.4"
},
"devDependencies": {
"bundle-loader": "^0.5.6",
"prettier": "^1.18.2",
"pretty-quick": "^1.11.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build && echo '/* /index.html 200' > build/_redirects",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"deploy": "aws s3 sync build s3://www.phyxable.com"
},
"main": "index.js",
"repository": {
"type": "git",
"url": "git+https://jacobmjones#bitbucket.org/jacobmjones/web.git"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"homepage": "https://bitbucket.org/jacobmjones/web#readme",
"author": "",
"license": "ISC",
"description": ""
}
it should be working fine as it works great on localhost but doesn't.
EDIT I was able to resolve this by changing the packages.json file..
From this:
...
"homepage": "https://bitbucket.org/jacobmjones/web#readme",
"author": "",
"license": "ISC",
"description": ""
...
To this:
...
"homepage": "/",
"author": "",
"license": "ISC",
"description": ""
...
This is happening due to mixed content which is preventing your CSS from loading...
Wherever you are importing this CSS within your app: 'http://video-react.js.org/assets/video-react.css'..
..change it to this, and it should work:
'https://video-react.js.org/assets/video-react.css'
Notice the https... You cannot use XHR on a secure (https) connection to retrieve resources on an insecure connection (http).. Your Netlify site is on https and that CSS file is on http - which qualifies for mixed-content.
Chrome
docs
Mozilla/Firefox docs
Error seems to be in 'unexpected token <'
The error Uncaught SyntaxError: Unexpected token < is most commonly caused by your site’s code referring to an asset that is no longer available. Most commonly, this is due to a filename change in assets generated during your build. The same situation happens if you use versioned or chunked javascript where the filename changes with every deploy.
Source: https://community.netlify.com/t/common-issue-why-do-i-see-uncaught-syntaxerror-unexpected-token-errors-how-can-i-use-chunking-or-versioning-for-my-assets-at-netlify/124
In addition, See if you can get any clues from here:
https://www.netlify.com/docs/build-gotchas/
Also, try upgrading node version to the latest one.
I am using the following command to build zeppelin 0.8 on ubuntu
mvn clean package -Pbuild-distr -Pyarn -Pspark-1.6
-Dspark.version=1.6.0 -Phadoop-2.6 -Dhadoop.version=2.6.0-cdh5.9.0 -DskipTests -Pvendor-repo
I am getting following error
[WARNING] warning Unmet peer dependency "eslint#>=3.8.1".
[INFO] [4/4] Building fresh packages...
[INFO] $ bower install --silent
[INFO] Done in 77.54s.
[INFO]
[INFO] --- frontend-maven-plugin:1.3:yarn (yarn build) # zeppelin-web ---
[INFO] Running 'yarn run build' in /home/[USER]/zeppelin/zeppelin-web
[INFO] yarn run v0.18.1
[INFO] $ npm-run-all clean
[ERROR] ERROR: spawn npm ENOENT
[ERROR] error Command failed with exit code 1.
[INFO] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
.
[INFO] Zeppelin: web Application ......................... FAILURE [1:20.415s]
[INFO] Zeppelin: Server .................................. SKIPPED
[INFO] Zeppelin: Packaging distribution .................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4:35.974s
[INFO] Finished at: Fri Jan 27 08:44:39 PST 2017
[INFO] Final Memory: 196M/464M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:yarn (yarn build) on project zeppelin-web: Failed to run task: 'yarn run build' failed. (error code 1) -> [Help 1]
[ERROR]
Installing npm on the host resolved the issue for me