Git Product home page Git Product logo

Comments (5)

murgatroid99 avatar murgatroid99 commented on August 18, 2024 3

As you can see, the difference is that the actual file exists in the directory with "v48" in its name, and it's looking in the directory with "v57" in its name. This means that you installed the package using Node 6 and you are trying to run it with Node 8. If you're having trouble getting those versions to match, one option would be to add a command line option when installing the package like this: npm install --target=8.0.0. It doesn't actually matter what minor version you specify there; only the major versions have to match.

from grpc-node.

murgatroid99 avatar murgatroid99 commented on August 18, 2024

That error message says that you're trying to use Node 0.10. I don't think you're successfully forcing 8.0.0.

from grpc-node.

samiq avatar samiq commented on August 18, 2024

ok so, my package.json has

"engines": {
    "node": "8.0.0"
  },

I tried rebuilding by pieces and got it to do the npm install with no issues as before but now, when I try to access firebase-admin in the code, its throwing a separate issue when it tries to launch the express app:

Error: Cannot find module 'D:\home\site\wwwroot\node_modules\grpc\src\node\extension_binary\node-v57-win32-ia32\grpc_node.node'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:\home\site\wwwroot\node_modules\grpc\src\grpc_extension.js:30:15)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:\home\site\wwwroot\node_modules\grpc\src\client.js:38:12)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
Application has thrown an uncaught exception and is terminated:
Error: Cannot find module 'D:\home\site\wwwroot\node_modules\grpc\src\node\extension_binary\node-v57-win32-ia32\grpc_node.node'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:\home\site\wwwroot\node_modules\grpc\src\grpc_extension.js:30:15)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:\home\site\wwwroot\node_modules\grpc\src\client.js:38:12)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)

if I look inside the node_modules to see what did npm installed, the grpc has the grpc_node.node under, so there is a discrepancy between whats expected and what's there

D:\home\site\wwwroot\node_modules\grpc\src\node\extension_binary\node-v48-win32-ia32>

from grpc-node.

samiq avatar samiq commented on August 18, 2024

just in case here is what my package.json looks like

{
  "name": "api",
  "version": "1.0.0",
  "private": true,
  "main": "dist",
  "scripts": {
    "build": "BABEL_ENV=production babel src -s -D -d dist --presets env,stage-0",
    "buildw": "SET BABEL_ENV=production && babel src -s -D -d dist --presets env,stage-0",
    "dev": "nodemon -w src --exec \"babel-node src --presets env,stage-0\"",
    "format": "prettier-eslint --write \"src/**/*.js\"",
    "start": "node dist",
    "scripts": "babel-node scripts --presets env,stage-0",
    "test": "mocha --timeout 30000 --compilers js:babel-core/register \"./test/**/*.test.js\""
  },
  "engines": {
    "node": "8.0.0"
  },
  "dependencies": {
    "async": "^2.6.0",
    "body-parser": "^1.18.2",
    "compression": "^1.7.1",
    "cors": "^2.8.4",
    "csv-parse": "^1.3.3",
    "express": "^4.16.2",
    "express-redis-cache": "git://github.com/leaffm/express-redis-cache.git",
    "firebase": "^4.6.2",
    "firebase-admin": "^5.5.0",
    "form-data": "^2.3.1",
    "google-auth-library": "^0.11.0",
    "google-cloud": "^0.57.0",
    "googleapis": "^22.2.0",
    "instagram-node": "^0.5.8",
    "moment": "^2.19.2",
    "morgan": "^1.9.0",
    "node-deezer": "^0.3.3",
    "node-fetch": "^1.7.3",
    "parse": "^1.10.2",
    "querystring": "^0.2.0",
    "redis": "^2.8.0",
    "sendgrid": "^5.2.3",
    "spotify-web-api-node": "^2.5.0",
    "stripe": "^5.3.0",
    "twitter": "^1.7.1"
  },
  "devDependencies": {
    "babel-cli": "^6.26.0",
    "babel-core": "^6.26.0",
    "babel-eslint": "^8.0.2",
    "babel-preset-env": "^1.6.1",
    "babel-preset-stage-0": "^6.24.1",
    "babel-register": "^6.26.0",
    "chai": "^4.1.2",
    "chai-http": "^3.0.0",
    "eslint": "^4.11.0",
    "eslint-config-airbnb-base": "12.1.0",
    "eslint-plugin-import": "^2.8.0",
    "eslint-plugin-mocha": "^4.11.0",
    "mocha": "^4.0.1",
    "nodemon": "^1.12.1",
    "prettier-eslint": "^8.2.2",
    "prettier-eslint-cli": "^4.4.0",
    "sinon": "^4.1.2",
    "tinify": "^1.5.0"
  }
}

from grpc-node.

samiq avatar samiq commented on August 18, 2024

@murgatroid99 thanks for that, I can verify that doing it this way worked 👍

from grpc-node.

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.