This repository was archived by the owner on May 22, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on May 22, 2023. It is now read-only.
Build is failing after Meteor 1.6 release #27
Copy link
Copy link
Open
Description
So, I was using minimeteor with gitlab CI and it was great.
Today exactly when meteor 1.6 has been release, my build broke.
Here's my .gitlab-ci.yml (relevant part):
buid_docker:
stage: docker
image: gitlab/dind:latest
script:
- cd app
- docker info
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
- curl https://aedm.github.io/minimeteor/build.sh | sh -s $CONTAINER_IMAGE
- docker push $CONTAINER_IMAGE
So, it just curls minimeteor's build.sh and runs it in my app's folder.
Here's what I get in build log:
$ curl https://aedm.github.io/minimeteor/build.sh | sh -s $CONTAINER_IMAGE
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 4312 100 4312 0 0 10759 0 --:--:-- --:--:-- --:--:-- 10780
Using temp dir: /tmp/minimeteor-2xcEz33U
[minimeteor] Building as root
[minimeteor] Copying project files to temp directory
[minimeteor] Writing Meteor build script
[minimeteor] Setting executable rights on build script
[minimeteor] Starting Meteor container
Unable to find image 'debian:latest' locally
latest: Pulling from library/debian
3e17c6eae66c: Pulling fs layer
3e17c6eae66c: Download complete
3e17c6eae66c: Pull complete
Digest: sha256:2e43e863a4ab6e53caf87a37d01d8c144cdcb732ad1b944fcf45cbfd7248a02a
Status: Downloaded newer image for debian:latest
[minimeteor] Meteor container started
[minimeteor] Updating apt
[minimeteor] Installing tools
debconf: delaying package configuration, since apt-utils is not installed
[minimeteor] Copying files
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 7782 0 7782 0 0 10921 0 --:--:-- --:--:-- --:--:-- 10929
Downloading Meteor distribution
Meteor 1.6 has been installed in your home directory (~/.meteor).
Writing a launcher script to /usr/local/bin/meteor for your convenience.
To get started fast:
$ meteor create ~/my_cool_app
$ cd ~/my_cool_app
$ meteor
Or see the docs at:
docs.meteor.com
[minimeteor] Installing NPM build dependencies
user, this is your first time using Meteor!
Installing a Meteor distribution in your home directory.
Downloading Meteor distribution
[minimeteor] Performing Meteor build
Error checking npm module: node-sass@>=3.x <=4.x (required by nathantreid:css-modules): module not found. Please ensure you have installed the module; here is the command:
meteor npm install node-sass --save-dev
Warning: unable to resolve "env" in presets of /home/user/source/.babelrc
Warning: unable to resolve "react" in presets of /home/user/source/.babelrc
Warning: unable to resolve "stage-2" in presets of /home/user/source/.babelrc
Warning: unable to resolve "babel-root-slash-import" in plugins of /home/user/source/.babelrc
Warning: unable to resolve "transform-decorators-legacy" in plugins of /home/user/source/.babelrc
Warning: unable to resolve "transform-class-properties" in plugins of /home/user/source/.babelrc
Error checking npm module: node-sass@>=3.x <=4.x (required by nathantreid:css-modules): module not found. Please ensure you have installed the module; here is the command:
meteor npm install node-sass --save-dev ....
And so on. So, it fails to install npm module idk why. Obviously, it is listed in package.json.
Same is happening when I try to build it on my local machine (mac OS).
I'd love to get help on this :(
Metadata
Metadata
Assignees
Labels
No labels
Activity
neoromantic commentedon Oct 30, 2017
So, i looked at npm install log in minimeteor container and here's what it says:
neoromantic commentedon Oct 30, 2017
Found it. It was corrupted package-lock.json.
aedm commentedon Oct 31, 2017
I'm glad you figured out how to run it on Gitlab. I tried for a while and encountered an error that I couldn't fix. Eventually, I left Gitlab CI altogether. Maybe I'll give it another shot.
neoromantic commentedon Nov 1, 2017
Still can't get it to work due to node version upgrade. So, I've trying to deploy my current app, that's on Meteor 1.5 and i get this:
I'm using css-modules with node-sass. Any Idea?
neoromantic commentedon Nov 1, 2017
If I understand things right, then it seems that when build.sh runs 'meteor npm install' on line 75, it uses latest meteor node version, which is 8.
Then, when build.sh runs 'meteor build', it correctly adjusts to node v.4 because my project is still on meteor 1.5.
So, question is how to make meteor npm install to use node version 4, just like when building. I actually don't know how to make it happen and why is npm install creates bindings for node8 instead of node4.
Same happens on my machine, so Gitlab CI is not relevant.
neoromantic commentedon Nov 1, 2017
So I logged into meteor build container and check how is it going, and here's what I see:
So, I don't know yet why, but meteor uses new node version instead of node4, which should be selected for meteor 1.5 application. Any ideas?
neoromantic commentedon Nov 1, 2017
So, what I did, is added empty meteor command with release tag, just before doing npm install:
in build script. And it worked. So, it seems that bug is in Meteor 1.6, that fails to choose proper meteor-tool version when installing npm packages on clean install.
I would appreciate if anyone could check my deductions and confirm or add to it.
csillag commentedon Jun 5, 2018
Meteor 1.7 and 1.7.0.1 is impacted by a recent NPM bug - see meteor/meteor#9940
I could successfully perform a build using the same workaround. (Adding
meteor --release 1.6.1 listbeforemeteor npm install.)