Code Monkey home page Code Monkey logo

Comments (16)

jackboberg avatar jackboberg commented on June 7, 2024

You can use --node-version to specify what you want written to the package.json. This option is also available to the modulus CLI.

from demeteorizer.

vladejs avatar vladejs commented on June 7, 2024

How I' am suppose to specify --node-version when I upload my source code to modulus via web interface?

from demeteorizer.

vladejs avatar vladejs commented on June 7, 2024

Lol. @theworkflow , the idea is to upload only my source code and let modulus demeteorize de project, because is a meteor project, not a nodejs one.

from demeteorizer.

jackboberg avatar jackboberg commented on June 7, 2024

@vladejs You are right, and unmodified source zip will default to whatever is in boot.js. demeteorizer could maybe pull from a root package.json engines property if specified..

from demeteorizer.

jackboberg avatar jackboberg commented on June 7, 2024

@vladejs sorry for the confusion, I think the issue is differentiating between what demeteorizer does (or should do)...and what modulus does (or should do).

from demeteorizer.

vladejs avatar vladejs commented on June 7, 2024

Modulus always uses demeteorizer

from demeteorizer.

jackboberg avatar jackboberg commented on June 7, 2024

maybe we can include copying over the root package.json engines property as a part of #228

from demeteorizer.

vladejs avatar vladejs commented on June 7, 2024

Sure, that would be a fix

from demeteorizer.

vladejs avatar vladejs commented on June 7, 2024

Hello @jackboberg , noticed #228 and #250 didn't solved my problem with Modulus, I have updated my package.json with engines property to use node v4.5.0 and when deploying to Modulus, I got the same node version no matter what.

This is what I get every single time I do modulus deploy:

Deploying project into Meteor runtime...
Starting build.
Creating directories for build environment.
Downloading source.
Executing build.
Now using node v4.4.7 (npm v3.10.5)
Installing root package.json dependencies.

from demeteorizer.

vladejs avatar vladejs commented on June 7, 2024

PLEASE FIX THIS. I can't even deploy using CODESHIP. On the above output it says

Now using node v4.4.7 (npm v3.10.5)

BUT, when deploy finishes it says:

Now using node v0.10.41 (npm v1.4.29)
deploy -> v0.10.41
Installing packages from /mnt/output/bundle/programs/server/package.json
...

This is critical.

The only way I can now set a working project on Modulus is by:

  1. Demeteorizing locally
  2. Changing engines property on /program/server/package.json to use node 4.5.0
  3. Compress the HUGE bundle and upload to Modulus via web interface

CodeShip Logs

Following is the complete output on Codeship (which just did modulus deploy)

Welcome to Modulus
You are logged in as cybertouchsolutions
Selecting amhstracker

Deploying Meteor version 1.4.2.3

Compressing project...
1.4 MB written
Uploading project...

Deploying project into Meteor runtime...
Starting build.
Creating directories for build environment.
Downloading source.
Executing build.
Now using node v4.4.7 (npm v3.10.5)
Installing root package.json dependencies.

> [email protected] install /mnt/input/node_modules/bcrypt
> node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
make: Entering directory `/mnt/input/node_modules/bcrypt/build'
CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
SOLINK_MODULE(target) Release/obj.target/bcrypt_lib.node
COPY Release/bcrypt_lib.node
make: Leaving directory `/mnt/input/node_modules/bcrypt/build'
[email protected] /mnt/input
[email protected] 
[email protected] 
[email protected] 
UNMET PEER DEPENDENCY graphql@^0.8.2
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
UNMET PEER DEPENDENCY simpl-schema@^0.0.3
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 

npm WARN [email protected] requires a peer of graphql@^0.8.2 but none was installed.
npm WARN [email protected] requires a peer of simpl-schema@^0.0.3 but none was installed.
Initializing Meteor environment.
Using [email protected].
Demeteorizing application...
Demeteorization complete.
npm WARN deprecated This version of npm lacks support for important features,
npm WARN deprecated such as scoped packages, offered by the primary npm
npm WARN deprecated registry. Consider upgrading to at least npm@2, if not the
npm WARN deprecated latest stable version. To upgrade to npm@2, run:
npm WARN deprecated 
npm WARN deprecated   npm -g install npm@latest-2
npm WARN deprecated 
npm WARN deprecated To upgrade to the latest stable version, run:
npm WARN deprecated 
npm WARN deprecated   npm -g install npm@latest
npm WARN deprecated 
npm WARN deprecated (Depending on how Node.js was installed on your system, you
npm WARN deprecated may need to prefix the preceding commands with `sudo`, or if
npm WARN deprecated on Windows, run them from an Administrator prompt.)
npm WARN deprecated 
npm WARN deprecated If you're running the version of npm bundled with
npm WARN deprecated Node.js 0.10 LTS, be aware that the next version of 0.10 LTS
npm WARN deprecated will be bundled with a version of npm@2, which has some small
npm WARN deprecated backwards-incompatible changes made to `npm run-script` and
npm WARN deprecated semver behavior.

Now using node v0.10.41 (npm v1.4.29)
deploy -> v0.10.41

Installing packages from /mnt/output/bundle/programs/server/package.json
WARN: npm-shrinkwrap.json will override dependencies declared in package.json.
npm WARN npm npm does not support Node.js v0.10.41
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm You can find the latest version at https://nodejs.org/

> [email protected] install /mnt/output/bundle/programs/server/node_modules/fibers
> node build.js || nodejs build.js

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
make: Entering directory `/mnt/output/bundle/programs/server/node_modules/fibers/build'
CXX(target) Release/obj.target/fibers/src/fibers.o
CXX(target) Release/obj.target/fibers/src/coroutine.o
CC(target) Release/obj.target/fibers/src/libcoro/coro.o
SOLINK_MODULE(target) Release/obj.target/fibers.node
COPY Release/fibers.node
make: Leaving directory `/mnt/output/bundle/programs/server/node_modules/fibers/build'
Installed in `/mnt/output/bundle/programs/server/node_modules/fibers/bin/linux-x64-11/fibers.node`
[email protected] /mnt/output/bundle/programs/server
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 

Uploading completed build.
Provisioning and deploying bundle to servos...
 
[] amhstracker running at name-93694.onmodulus.net

Modulus Logs

This is what modulus shows when the app is "deployed":

Found package.json: ./bundle/programs/server/package.json
Running command: npm start

> [email protected] start /mnt/app/bundle/programs/server
> node ../../main

assert.js:93

  throw new assert.AssertionError({ 
  ^

AssertionError: "undefined" === "function"
    at wrapPathFunction (/mnt/app/bundle/programs/server/mini-files.js:77:10)
    at Object.<anonymous> (/mnt/app/bundle/programs/server/mini-files.js:108:24)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/mnt/app/bundle/programs/server/boot.js:9:13)
    at Module._compile (module.js:456:26)

from demeteorizer.

jackboberg avatar jackboberg commented on June 7, 2024

@vladejs I am taking a look at your project now. In our tests here, demeteorizer definitely supports setting the version via root package.json, and as you can see here Modulus updated the build image to use the new features from demeteorizer..

from demeteorizer.

jackboberg avatar jackboberg commented on June 7, 2024

Update: able to reproduce, digging deeper. Thanks @vladejs for bringing this back to my attention.

from demeteorizer.

jackboberg avatar jackboberg commented on June 7, 2024

@vladejs we rebuilt the docker images, updated the registry, and it seems to be resolved now:

Demeteorization complete.
Now using node v4.5.0 (npm v2.15.9)
deploy -> v4.5.0 *

Please try again and let me know if you still see the issue.

from demeteorizer.

vladejs avatar vladejs commented on June 7, 2024

Well @jackboberg , you almost got it.
CodeShip is giving me a green flag, BUT, my app still fails.

Why?

See the output on your own comment:

Demeteorization complete.
Now using node v4.5.0 (npm v2.15.9)
deploy -> v4.5.0 *

It says NPM version 2.15.9 was used, so you can guess, NodeJS > 4 don't work well with NPM < 3.
As a result, my meteor app is not getting right my npm dependencies. Please fix that in a way demeteorizer correctly reads the npm property on my package.json:

"engines": {
  "node": "4.4.7",
  "npm": "latest"
}

from demeteorizer.

jackboberg avatar jackboberg commented on June 7, 2024

I saw that, and opened an issue here earlier: XervoIO/docker-build-meteor/issues/35

I think we should move this discussion there, since it's no longer an issue with demeteorizer

from demeteorizer.

vladejs avatar vladejs commented on June 7, 2024

Problem solved. CodeShip is now giving me a green flag.

from demeteorizer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.