-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
switch back to official standard-minifier-js #3363
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing builds:
No errors seen in development mode.
Testing production build with fresh clone, ran:
meteor build --directory /tmp/
cd /tmp/bundle/programs/server
npm install
cd ../../
ROOT_URL="http://localhost:3000" MONGO_URL="mongodb://localhost:27017/reaction" PORT="3000" node main.js
No issues seen in production build.
Tested react:
function isDevReact() {
try {
React.createClass({});
} catch(e) {
if (e.message.indexOf('render') >= 0) {
return true; // A nice, specific error message
} else {
return false; // A generic error message
}
}
return false; // should never happen, but play it safe.
};
isDevReact();
and also
if (!process.env.NODE_ENV || process.env.NODE_ENV === 'development') {
console.log("development");
} else {
console.log("production");
}
Both the swag.getreaction.io (Reaction / Meteor 1.6.0 without the standard minifier) and hello.reactioncommerce.com return "not development" mode as well.
Is there another way to verify if this is resolving #2629 or #1896? I see the same results (production) on all cases...
I was not able to build a docker image locally using:
docker build --build-arg TOOL_NODE_FLAGS="--max-old-space-size=4096" -t reactioncommerce/reaction:latest .
Hangs on
[-] Building Meteor application...
Can we clarify acceptance criteria?
I've been using the React developer tool plugin to verify.
I guess we need to dig into the plugin a little and determine how exactly it's deciding this is the |
A quick check of the code says
I haven't figured out how to get that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was able to verify react now in production, and after clearing all local images, etc. was able to build a reaction image locally. Approved.
After not seeing any error, I thought the build had succeeded, but the image wasn't actually created, and after re-running twice more, both the docker build attempts failed. Are there other recommended config options?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On OS X - I've now completed multiple tests.
Successfully built master
Removing intermediate container 4dfbc56d30ca
Successfully built b8cc37047361
Successfully tagged reactioncommerce/reaction:latest
Repeated attempts to build this branch, all returned a non-zero code: 137
, and didn't create/tag the new images.
This just worked for me multiple times on both Mac and Linux. docker build --build-arg TOOL_NODE_FLAGS="--max-old-space-size=2048" -t reactioncommerce/reaction:latest . So am I the only person not running into the issue? |
pulling a fresh copy and reviewing now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to build successfully
Steps:
reaction init new-directory
git checkout standard-minifier-update
reaction
ctrl-c
docker build --build-arg TOOL_NODE_FLAGS="--max-old-space-size=2048" -t reactioncommerce/reaction:latest .
Building dependency tree...
Reading state information...
---> fbd541991807
Removing intermediate container afcacf82fcf2
Removing intermediate container 8f675b6a7f6a
Removing intermediate container f63777deda1e
Removing intermediate container dd7d19e0da35
Removing intermediate container b3572946c52a
Removing intermediate container 0e52f48728c1
Removing intermediate container 21203aede6fe
Removing intermediate container 00a59ec218c4
Removing intermediate container dd90187972b0
Removing intermediate container 72ea578fce83
Removing intermediate container 4267a425feb2
Removing intermediate container 51c9b31371e2
Step 2/3 : ENV ROOT_URL "http://localhost"
---> Running in afff691b1351
---> b0a1908b7efe
Removing intermediate container afff691b1351
Step 3/3 : ENV MONGO_URL "mongodb://127.0.0.1:27017/reaction"
---> Running in 7db59774d658
---> c2dfdc6f1c93
Removing intermediate container 7db59774d658
Successfully built c2dfdc6f1c93
Successfully tagged reactioncommerce/reaction:latest
BitHound reporting two failures, but also has a blank screen.
eslint .
in the project directory returns no errors. Coadacy returns no errors.
Any idea what BitHound is concerned about or is this just the latest reason to leave BH?
I followed the steps that Spencer outlined above and it failed. I then switched to Also, Bithound be gone. |
- resolve issue with Mongo 3.4+ connectivity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Success with:
docker build --build-arg TOOL_NODE_FLAGS="--max-old-space-size=2048" -t reactioncommerce/reaction:latest .
docker-compose -f docker-compose.yml up
switch back to official standard-minifier-js
This resolves #2629 where the production version of React wasn't being used in production builds. We already made this switch when updating to Meteor 1.5 (#2371), but I don't know why we switched back to
abernix:standard-minifier-js
shortly after that. Somewhere between June 7 (where Meteor 1.5 was merged) and the release of Reaction 1.3.0 on June 21 it appears that it got reverted toabernix:standard-minifier-js
. Possibly a mistake during a merge conflict resolution? There are no commits to the.meteor/packages
file during that period that directly reference changing that package, so I'm thinking it had to be unintentional during a merge conflict.Anyway, please give this a thorough test and see if you can find any build issues. I've done a full production build/deployment with Docker and haven't seen any issues.