Error: Cannot find module 'entities/lib/decode_codepoint.js'


#1

After several trials I’m still yet to be able to complete deployment of my Meteor v1.6 appto the server. it kept on throwing different dependency issues, one of it is this failure error I’m reporting: Today completes 2 weeks I have been trying deployment. @abernix please kindly help look into this.

Started TaskList: Pushing Meteor App
[xxx.xxx.xxx.xxx] - Pushing Meteor App Bundle to The Server
[xxx.xxx.xxx.xxx] - Pushing Meteor App Bundle to The Server: SUCCESS
[xxx.xxx.xxx.xxx] - Prepare Bundle
node-8.9.1-base: Pulling from abernix/meteord
c20dc0c5afeb: Already exists

Digest: sha256:9a12326012a41b5ddd2210d5e5d590bb3506bc341a7f5e1540b451e975bb559c
Status: Image is up to date for abernix/meteord:node-8.9.1-base
myschoolapps
tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'
Sending build context to Docker daemon  168.1MB
Step 1/6 : FROM abernix/meteord:node-8.9.1-base
# Executing 1 build trigger
 ---> Using cache
 ---> 69ef9f327520
Step 2/6 : RUN mkdir /built_app
 ---> Using cache
 ---> c4ed20b9a7cf
Step 3/6 : COPY ./ /built_app
 ---> 098de43aad6e
Step 4/6 : ENV ROOT_URL=https://rabonni.com
 ---> Running in cc5af42fa5dc
Removing intermediate container cc5af42fa5dc
 ---> f0663b5136b9
Step 5/6 : ENV MONGO_URL=mongodb://mongodb:27017/myschoolapps
 ---> Running in d9ee963c4ec5
Removing intermediate container d9ee963c4ec5
 ---> 50ea7d2ea301
Step 6/6 : RUN cd  /built_app/programs/server &&     npm install --unsafe-perm
 ---> Running in 2aac33cbf196

> fibers@2.0.0 install /built_app/programs/server/node_modules/fibers
> node build.js || nodejs build.js

`linux-x64-57` exists; testing
Binary is fine; exiting

> meteor-dev-bundle@0.0.0 install /built_app/programs/server
> node npm-rebuild.js


> bcrypt@1.0.3 install /built_app/programs/server/npm/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build

[bcrypt] Success: "/built_app/programs/server/npm/node_modules/bcrypt/lib/binding/bcrypt_lib.node" is installed via remote
mongo-object@0.0.3 /built_app/programs/server/npm/node_modules/mongo-object
range-parser@1.2.0 /built_app/programs/server/npm/node_modules/range-parser
{
  "meteor-dev-bundle": "0.0.0",
  "npm": "5.5.1",
  "ares": "1.10.1-DEV",
  "cldr": "31.0.1",
  "http_parser": "2.7.0",
  "icu": "59.1",
  "modules": "57",
  "nghttp2": "1.25.0",
  "node": "8.9.1",
  "openssl": "1.0.2m",
  "tz": "2017b",
  "unicode": "9.0",
  "uv": "1.15.0",
  "v8": "6.1.534.47",
  "zlib": "1.2.11"
}
npm WARN meteor-dev-bundle@0.0.0 No description
npm WARN meteor-dev-bundle@0.0.0 No repository field.
npm WARN meteor-dev-bundle@0.0.0 No license field.

added 136 packages in 9.37s
Removing intermediate container 2aac33cbf196
 ---> 648b608eb2f8
Successfully built 648b608eb2f8
Successfully tagged mup-myschoolapps:build
Error response from daemon: Cannot link to a non running container: /mongodb AS /myschoolapps/mongodb
Error: failed to start containers: myschoolapps
Deleted Images:
deleted: sha256:d212823744e8ffd8ec772563bc330b1a8224f3cdeac1e2607e75e45a0424fe13

Total reclaimed space: 137.6MB
[xxx.xxx.xxx.xxx] - Prepare Bundle: SUCCESS

Started TaskList: Configuring App
[xxx.xxx.xxx.xxx] - Pushing the Startup Script
[xxx.xxx.xxx.xxx] - Pushing the Startup Script: SUCCESS
[xxx.xxx.xxx.xxx] - Sending Environment Variables
[xxx.xxx.xxx.xxx] - Sending Environment Variables: SUCCESS

Started TaskList: Start Meteor
[xxx.xxx.xxx.xxx] - Start Meteor
using image
removing last
Image mup-myschoolapps:latest
Volume
Removing docker containers. Errors about nonexistent endpoints and containers are normal.
myschoolapps
Error response from daemon: endpoint myschoolapps not found
Error: No such container: myschoolapps-frontend
Error response from daemon: endpoint myschoolapps-frontend not found
Error: No such container: myschoolapps-nginx-letsencrypt
Error response from daemon: endpoint myschoolapps-nginx-letsencrypt not found
Error: No such container: myschoolapps-nginx-proxy
Error response from daemon: endpoint myschoolapps-nginx-proxy not found
Finished removing docker containers
a494aa92f0e860b6b333f59827f51ca26fe314ea93dd10efde353ce10bce7ec2
Ran abernix/meteord:node-8.9.1-base
[xxx.xxx.xxx.xxx] - Start Meteor: SUCCESS
[xxx.xxx.xxx.xxx] - Verifying Deployment
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (7) Failed to connect to localhost port 80: Connection refused
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (7) Failed to connect to localhost port 80: 
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
=> Starting meteor app on port:80
/built_app/programs/server/node_modules/fibers/future.js:280
                                                throw(ex);
                                                ^

Error: Cannot find module 'entities/lib/decode_codepoint.js'
    at Function.Module._resolveFilename (module.js:536:15)
    at Function.Module._load (module.js:466:25)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/babrahams_editable-text/node_modules/sanitize-html/node_modules/htmlparser2/lib/Tokenizer.js:3:23)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
=> Starting meteor app on port:80
/built_app/programs/server/node_modules/fibers/future.js:280
                                                throw(ex);
                                                ^

        => Redeploying previous version of the app

        -----------------------------------STDOUT-----------------------------------

        To see more logs type 'mup logs --tail=100'

        ----------------------------------------------------------------------------

C:\Programs\contract\myschoolapps\.deploy>

#2

Assuming you’ve just updated from a version prior to Meteor 1.6 (which would have used a version of Node.js prior to version 8, and thus a different ABI), I would suggest rebuilding your node_modules for Meteor 1.6/Node 8 by running:

meteor npm rebuild

…before doing a deploy.

If that doesn’t work, I’d suggest the more extreme step of removing the existing node_modules directory and reinstalling with meteor npm install.