Node.js Mailer issue

Gave it a go and it seems like it’s probably a reasonable response but I’m not 100% sure this won’t break the rest of my site. LOL!

This error message is indicating that your application is not set up to follow the expected file structure for a CloudLinux NodeJS Selector environment. To fix this error, you will need to create a separate folder for your application’s node modules and use a symbolic link to point to this folder from your application’s root directory.

Here are the steps you can follow:

  1. Create a new folder in your application’s root directory. You can name it whatever you like, but a common convention is to name it “env”.
  2. Move all of your application’s node modules into this new folder.
  3. Create a symbolic link in your application’s root directory that points to the “node_modules” folder in your new “env” folder. You can do this using the following command:

bashCopy code

ln -s env/node_modules node_modules

This will create a symbolic link named “node_modules” that points to the “node_modules” folder in your “env” directory.
4. Make sure that your application’s code is referencing the correct path to the “node_modules” folder. This will likely involve changing any import statements that refer to the “node_modules” folder in your application’s root directory to instead reference the new symbolic link.

Once you have completed these steps, your application should be set up correctly to work with the CloudLinux NodeJS Selector environment, and you should no longer receive the error message you were seeing.

Symbolic links are quite normal in the Linux environment. It should not break anything. The only issue I see is with Wappler not understanding this structure and throwing an error? Its difficult to set up custom environments outside of the Wappler defaults. Maybe as Apple suggested a quick word with your hosting provider may resolve the problem? Could be worth waiting until they answer you. Personally I’d go for it but am a real sucker for punishment and problem solving! :smiley:

LOL! I have put in a support ticket so hopefully they’ll be able to help. If not - I’ll give it a go and hope for the best. I’ve been using PHP forever so this is all new for me but I’ll get it eventually. Thanks for your suggestions!

2 Likes

We are in a similar situation with Node also. Is a learning curve but yet to see any benefits if I am honest.

Fingers crossed you get the help to resolve it promptly!

:slight_smile:

I am definitely questioning whether it’s worth the hassle!!!

Maybe this will help

Hey Ben - I tried that earlier but Wappler didn’t recreate the lib folder. Not sure if that’s the issue though.

So here’s the response from my host…

Thanks for the update and we are sorry to hear about the continued trouble and we regret the inconvenience caused to you in this regard.

This is your setup, you had stored node modules for application, as the message said, application should not contain folder/file with such name in application root

so we moved/renamed that and ran: node_modules are now symlinked to /home/wwwtrip/nodevenv/app/16/lib/node_modules/

lrwxrwxrwx 1 wwwtrip wwwtrip 46 Feb 15 02:18 node_modules -> /home/wwwtrip/nodevenv/app/16/lib/node_modules/
drwxrwxr-x 225 wwwtrip wwwtrip 12288 Feb 12 20:09 node_modules.backup/

[app (16)] wwwtrip@mi3-sr19 [~/app]# mv node_modules/ node_modules.backup
[app (16)] wwwtrip@mi3-sr19 [~/app]# npm install
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: ws@8.11.0
npm WARN Found: utf-8-validate@6.0.2
npm WARN node_modules/utf-8-validate
npm WARN utf-8-validate@"^6.0.2" from the root project
npm WARN
npm WARN Could not resolve dependency:
npm WARN peerOptional utf-8-validate@"^5.0.2" from ws@8.11.0
npm WARN node_modules/ws
npm WARN ws@"~8.11.0" from engine.io@6.4.0
npm WARN node_modules/engine.io
npm WARN 1 more (socket.io-adapter)
npm WARN
npm WARN Conflicting peer dependency: utf-8-validate@5.0.10
npm WARN node_modules/utf-8-validate
npm WARN peerOptional utf-8-validate@"^5.0.2" from ws@8.11.0
npm WARN node_modules/ws
npm WARN ws@"~8.11.0" from engine.io@6.4.0
npm WARN node_modules/engine.io
npm WARN 1 more (socket.io-adapter)
[##################] - reify:nodemailer: http fetch GET 200 https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.1.tgz 574ms (cache miss)
npm ERR! path /home/wwwtrip/nodevenv/app/16/lib/node_modules/bufferutil
npm ERR! command failed
npm ERR! signal SIGINT
npm ERR! command sh /tmp/install-d7c23e24.sh

npm ERR! A complete log of this run can be found in:
npm ERR! /home/wwwtrip/.npm/_logs/2023-02-15T07_18_33_504Z-debug-0.log

I guess you need to talk to developer about that, I am attaching herewith a complete log. This is unfortunately beyond the scope of our support. If you need help with a specific item related to our servers or hosting infrastructure, we would be more than happy to help. Otherwise, you will need to reach out to a developer to address any issues with your coding/setup.

We hope this helps.

We are standing by to provide you additional assistance, if needed. Remember we are here 24/7.

Thank you.


And the log file contents (would have uploaded file but .log file type not allowed)

0 verbose cli /opt/alt/alt-nodejs16/root/usr/bin/node /opt/alt/alt-nodejs16/root/usr/bin/npm
1 info using npm@8.15.0
2 info using node@v16.17.1
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:/opt/alt/alt-nodejs16/root/usr/lib/node_modules/npm/npmrc Completed in 1ms
6 timing config:load:builtin Completed in 1ms
7 timing config:load:cli Completed in 3ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:/home/wwwtrip/nodevenv/app/16/lib/.npmrc Completed in 0ms
10 timing config:load:project Completed in 1ms
11 timing config:load:file:/home/wwwtrip/.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:/home/wwwtrip/nodevenv/app/16/lib/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 1ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 1ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 10ms
19 timing npm:load:configload Completed in 10ms
20 timing npm:load:mkdirpcache Completed in 2ms
21 timing npm:load:mkdirplogs Completed in 0ms
22 verbose title npm install
23 verbose argv “install” “–prefix” “/home/wwwtrip/nodevenv/app/16/lib”
24 timing npm:load:setTitle Completed in 2ms
25 timing config:load:flatten Completed in 4ms
26 timing npm:load:display Completed in 6ms
27 verbose logfile logs-max:10 dir:/home/wwwtrip/.npm/_logs
28 verbose logfile /home/wwwtrip/.npm/_logs/2023-02-15T07_18_33_504Z-debug-0.log
29 timing npm:load:logFile Completed in 34ms
30 timing npm:load:timers Completed in 0ms
31 timing npm:load:configScope Completed in 0ms
32 timing npm:load Completed in 56ms
33 timing arborist:ctor Completed in 1ms
34 silly logfile start cleaning logs, removing 1 files
35 silly logfile done cleaning log files
36 timing idealTree:init Completed in 266ms
37 timing idealTree:userRequests Completed in 0ms
38 silly idealTree buildDeps
39 silly fetch manifest bufferutil@^4.0.7
40 timing arborist:ctor Completed in 0ms
41 http fetch GET 200 https://registry.npmjs.org/bufferutil 1478ms (cache revalidated)
42 silly fetch manifest utf-8-validate@^6.0.2
43 http fetch GET 200 https://registry.npmjs.org/utf-8-validate 386ms (cache revalidated)
44 silly fetch manifest nodemailer@^6.7.1
45 http fetch GET 200 https://registry.npmjs.org/nodemailer 82ms (cache miss)
46 silly placeDep ROOT bufferutil@4.0.7 OK for: trip_pakers_node_es@1.6.0 want: ^4.0.7
47 silly placeDep ROOT nodemailer@6.9.1 OK for: trip_pakers_node_es@1.6.0 want: ^6.7.1
48 silly placeDep ROOT utf-8-validate@6.0.2 OK for: trip_pakers_node_es@1.6.0 want: ^6.0.2
49 silly fetch manifest node-gyp-build@^4.3.0
50 http fetch GET 200 https://registry.npmjs.org/node-gyp-build 398ms (cache revalidated)
51 timing idealTree:#root Completed in 2364ms
52 silly placeDep ROOT node-gyp-build@4.6.0 OK for: bufferutil@4.0.7 want: ^4.3.0
53 timing idealTree:node_modules/bufferutil Completed in 3ms
54 timing idealTree:node_modules/node-gyp-build Completed in 0ms
55 timing idealTree:node_modules/nodemailer Completed in 0ms
56 timing idealTree:node_modules/utf-8-validate Completed in 0ms
57 silly fetch manifest utf-8-validate@^5.0.2
58 warn ERESOLVE overriding peer dependency {
58 warn ERESOLVE code: ‘ERESOLVE’,
58 warn ERESOLVE edge: {
58 warn ERESOLVE type: ‘peerOptional’,
58 warn ERESOLVE name: ‘utf-8-validate’,
58 warn ERESOLVE spec: ‘^5.0.2’,
58 warn ERESOLVE error: ‘INVALID’,
58 warn ERESOLVE from: {
58 warn ERESOLVE name: ‘ws’,
58 warn ERESOLVE version: ‘8.11.0’,
58 warn ERESOLVE location: ‘node_modules/ws’,
58 warn ERESOLVE isWorkspace: false,
58 warn ERESOLVE dependents: [Array]
58 warn ERESOLVE }
58 warn ERESOLVE },
58 warn ERESOLVE dep: {
58 warn ERESOLVE name: ‘utf-8-validate’,
58 warn ERESOLVE version: ‘5.0.10’,
58 warn ERESOLVE whileInstalling: {
58 warn ERESOLVE name: ‘ws’,
58 warn ERESOLVE version: ‘8.11.0’,
58 warn ERESOLVE path: ‘/home/wwwtrip/nodevenv/app/16/lib/node_modules/ws’
58 warn ERESOLVE },
58 warn ERESOLVE location: ‘node_modules/utf-8-validate’,
58 warn ERESOLVE isWorkspace: false,
58 warn ERESOLVE dependents: [ [Object] ]
58 warn ERESOLVE },
58 warn ERESOLVE current: {
58 warn ERESOLVE name: ‘utf-8-validate’,
58 warn ERESOLVE version: ‘6.0.2’,
58 warn ERESOLVE location: ‘node_modules/utf-8-validate’,
58 warn ERESOLVE isWorkspace: false,
58 warn ERESOLVE dependents: [ [Object] ]
58 warn ERESOLVE },
58 warn ERESOLVE peerConflict: {
58 warn ERESOLVE current: {
58 warn ERESOLVE name: ‘utf-8-validate’,
58 warn ERESOLVE version: ‘6.0.2’,
58 warn ERESOLVE location: ‘node_modules/utf-8-validate’,
58 warn ERESOLVE isWorkspace: false,
58 warn ERESOLVE dependents: [Array]
58 warn ERESOLVE },
58 warn ERESOLVE peer: {
58 warn ERESOLVE name: ‘utf-8-validate’,
58 warn ERESOLVE version: ‘5.0.10’,
58 warn ERESOLVE whileInstalling: [Object],
58 warn ERESOLVE location: ‘node_modules/utf-8-validate’,
58 warn ERESOLVE isWorkspace: false,
58 warn ERESOLVE dependents: [Array]
58 warn ERESOLVE }
58 warn ERESOLVE },
58 warn ERESOLVE strictPeerDeps: false,
58 warn ERESOLVE force: false,
58 warn ERESOLVE isMine: false
58 warn ERESOLVE }
59 timing idealTree:node_modules/ws Completed in 9ms
60 timing idealTree:buildDeps Completed in 2377ms
61 timing idealTree:fixDepFlags Completed in 5ms
62 timing idealTree Completed in 2656ms
63 timing reify:loadTrees Completed in 2656ms
64 timing reify:diffTrees Completed in 10ms
65 silly reify moves {}
66 timing reify:retireShallow Completed in 0ms
67 timing reify:createSparse Completed in 2ms
68 timing reify:loadBundles Completed in 0ms
69 silly audit bulk request {
69 silly audit ‘@socket.io/component-emitter’: [ ‘3.1.0’ ],
69 silly audit ‘@types/cookie’: [ ‘0.4.1’ ],
69 silly audit ‘@types/cors’: [ ‘2.8.13’ ],
69 silly audit ‘@types/node’: [ ‘18.13.0’ ],
69 silly audit abbrev: [ ‘1.1.1’ ],
69 silly audit accepts: [ ‘1.3.8’ ],
69 silly audit ‘ansi-styles’: [ ‘4.3.0’ ],
69 silly audit anymatch: [ ‘3.1.3’ ],
69 silly audit archiver: [ ‘5.3.1’ ],
69 silly audit ‘archiver-utils’: [ ‘2.1.0’ ],
69 silly audit ‘readable-stream’: [ ‘2.3.7’, ‘3.6.0’ ],
69 silly audit string_decoder: [ ‘1.1.1’, ‘1.3.0’ ],
69 silly audit ‘array-flatten’: [ ‘1.1.1’ ],
69 silly audit ‘asn1.js’: [ ‘5.4.1’ ],
69 silly audit async: [ ‘3.2.4’ ],
69 silly audit bagpipe: [ ‘0.3.5’ ],
69 silly audit ‘balanced-match’: [ ‘1.0.2’ ],
69 silly audit ‘base64-js’: [ ‘1.5.1’ ],
69 silly audit base64id: [ ‘2.0.0’ ],
69 silly audit ‘big-integer’: [ ‘1.6.51’ ],
69 silly audit ‘bignumber.js’: [ ‘9.0.0’ ],
69 silly audit binary: [ ‘0.3.0’ ],
69 silly audit ‘binary-extensions’: [ ‘2.2.0’ ],
69 silly audit bl: [ ‘4.1.0’ ],
69 silly audit bluebird: [ ‘3.7.2’, ‘3.4.7’ ],
69 silly audit ‘bn.js’: [ ‘4.12.0’ ],
69 silly audit ‘body-parser’: [ ‘1.20.1’ ],
69 silly audit bytes: [ ‘3.1.2’, ‘3.0.0’ ],
69 silly audit debug: [ ‘2.6.9’, ‘4.3.4’, ‘3.2.7’ ],
69 silly audit ms: [ ‘2.0.0’, ‘2.1.2’, ‘2.1.3’ ],
69 silly audit ‘brace-expansion’: [ ‘1.1.11’, ‘2.0.1’ ],
69 silly audit braces: [ ‘3.0.2’ ],
69 silly audit buffer: [ ‘5.7.1’ ],
69 silly audit ‘buffer-crc32’: [ ‘0.2.13’ ],
69 silly audit ‘buffer-indexof-polyfill’: [ ‘1.0.2’ ],
69 silly audit buffers: [ ‘0.1.1’ ],
69 silly audit busboy: [ ‘1.6.0’ ],
69 silly audit ‘call-bind’: [ ‘1.0.2’ ],
69 silly audit chainsaw: [ ‘0.1.0’ ],
69 silly audit chalk: [ ‘4.1.2’ ],
69 silly audit chokidar: [ ‘3.5.3’ ],
69 silly audit ‘color-convert’: [ ‘2.0.1’ ],
69 silly audit ‘color-name’: [ ‘1.1.4’ ],
69 silly audit colorette: [ ‘2.0.19’ ],
69 silly audit commander: [ ‘9.5.0’ ],
69 silly audit ‘compress-commons’: [ ‘4.1.1’ ],
69 silly audit compressible: [ ‘2.0.18’ ],
69 silly audit compression: [ ‘1.7.4’ ],
69 silly audit ‘concat-map’: [ ‘0.0.1’ ],
69 silly audit ‘connect-session-knex’: [ ‘3.0.1’ ],
69 silly audit ‘content-disposition’: [ ‘0.5.4’ ],
69 silly audit ‘safe-buffer’: [ ‘5.2.1’, ‘5.1.2’ ],
69 silly audit ‘content-type’: [ ‘1.0.5’ ],
69 silly audit cookie: [ ‘0.4.1’, ‘0.4.2’, ‘0.5.0’ ],
69 silly audit ‘cookie-parser’: [ ‘1.4.6’ ],
69 silly audit ‘cookie-signature’: [ ‘1.0.6’ ],
69 silly audit ‘core-util-is’: [ ‘1.0.3’ ],
69 silly audit cors: [ ‘2.8.5’ ],
69 silly audit ‘crc-32’: [ ‘1.2.2’ ],
69 silly audit ‘crc32-stream’: [ ‘4.0.2’ ],
69 silly audit ‘cron-parser’: [ ‘4.7.1’ ],
69 silly audit depd: [ ‘2.0.0’ ],
69 silly audit destroy: [ ‘1.2.0’ ],
69 silly audit dotenv: [ ‘16.0.3’ ],
69 silly audit duplexer2: [ ‘0.1.4’ ],
69 silly audit ‘ee-first’: [ ‘1.1.1’ ],
69 silly audit ejs: [ ‘3.1.8’ ],
69 silly audit encodeurl: [ ‘1.0.2’ ],
69 silly audit ‘end-of-stream’: [ ‘1.4.4’ ],
69 silly audit ‘engine.io’: [ ‘6.4.0’ ],
69 silly audit ‘engine.io-parser’: [ ‘5.0.6’ ],
69 silly audit escalade: [ ‘3.1.1’ ],
69 silly audit ‘escape-html’: [ ‘1.0.3’ ],
69 silly audit esm: [ ‘3.2.25’ ],
69 silly audit etag: [ ‘1.8.1’ ],
69 silly audit express: [ ‘4.18.2’ ],
69 silly audit ‘express-end’: [ ‘0.0.8’ ],
69 silly audit ‘express-fileupload’: [ ‘1.4.0’ ],
69 silly audit ‘express-session’: [ ‘1.17.3’ ],
69 silly audit filelist: [ ‘1.0.4’ ],
69 silly audit minimatch: [ ‘5.1.6’, ‘3.1.2’ ],
69 silly audit ‘fill-range’: [ ‘7.0.1’ ],
69 silly audit finalhandler: [ ‘1.2.0’ ],
69 silly audit ‘follow-redirects’: [ ‘1.15.2’ ],
69 silly audit forwarded: [ ‘0.2.0’ ],
69 silly audit fresh: [ ‘0.5.2’ ],
69 silly audit ‘fs-constants’: [ ‘1.0.0’ ],
69 silly audit ‘fs-extra’: [ ‘10.1.0’, ‘8.1.0’ ],
69 silly audit ‘fs.realpath’: [ ‘1.0.0’ ],
69 silly audit fsevents: [ ‘2.3.2’ ],
69 silly audit fstream: [ ‘1.0.12’ ],
69 silly audit ‘function-bind’: [ ‘1.1.1’ ],
69 silly audit ‘get-intrinsic’: [ ‘1.2.0’ ],
69 silly audit ‘get-package-type’: [ ‘0.1.0’ ],
69 silly audit getopts: [ ‘2.3.0’ ],
69 silly audit glob: [ ‘7.2.3’ ],
69 silly audit ‘glob-parent’: [ ‘5.1.2’ ],
69 silly audit ‘graceful-fs’: [ ‘4.2.10’ ],
69 silly audit has: [ ‘1.0.3’ ],
69 silly audit ‘has-flag’: [ ‘4.0.0’, ‘3.0.0’ ],
69 silly audit ‘has-symbols’: [ ‘1.0.3’ ],
69 silly audit ‘http-errors’: [ ‘2.0.0’ ],
69 silly audit ‘iconv-lite’: [ ‘0.4.24’ ],
69 silly audit ieee754: [ ‘1.2.1’ ],
69 silly audit ‘ignore-by-default’: [ ‘1.0.1’ ],
69 silly audit imurmurhash: [ ‘0.1.4’ ],
69 silly audit inflight: [ ‘1.0.6’ ],
69 silly audit inherits: [ ‘2.0.4’ ],
69 silly audit interpret: [ ‘2.2.0’ ],
69 silly audit ‘ipaddr.js’: [ ‘1.9.1’ ],
69 silly audit ‘is-binary-path’: [ ‘2.1.0’ ],
69 silly audit ‘is-core-module’: [ ‘2.11.0’ ],
69 silly audit ‘is-extglob’: [ ‘2.1.1’ ],
69 silly audit ‘is-glob’: [ ‘4.0.3’ ],
69 silly audit ‘is-number’: [ ‘7.0.0’ ],
69 silly audit ‘is-typedarray’: [ ‘1.0.0’ ],
69 silly audit isarray: [ ‘1.0.0’ ],
69 silly audit jake: [ ‘10.8.5’ ],
69 silly audit jsonfile: [ ‘6.1.0’, ‘4.0.0’ ],
69 silly audit knex: [ ‘2.4.2’ ],
69 silly audit kruptein: [ ‘2.2.3’ ],
69 silly audit lazystream: [ ‘1.0.1’ ],
69 silly audit listenercount: [ ‘1.0.1’ ],
69 silly audit lodash: [ ‘4.17.21’ ],
69 silly audit ‘lodash.defaults’: [ ‘4.2.0’ ],
69 silly audit ‘lodash.difference’: [ ‘4.5.0’ ],
69 silly audit ‘lodash.flatten’: [ ‘4.4.0’ ],
69 silly audit ‘lodash.isplainobject’: [ ‘4.0.6’ ],
69 silly audit ‘lodash.union’: [ ‘4.6.0’ ],
69 silly audit ‘long-timeout’: [ ‘0.1.1’ ],
69 silly audit luxon: [ ‘3.2.1’ ],
69 silly audit ‘media-typer’: [ ‘0.3.0’ ],
69 silly audit ‘merge-descriptors’: [ ‘1.0.1’ ],
69 silly audit methods: [ ‘1.1.2’ ],
69 silly audit mime: [ ‘1.6.0’ ],
69 silly audit ‘mime-db’: [ ‘1.52.0’ ],
69 silly audit ‘mime-types’: [ ‘2.1.35’ ],
69 silly audit ‘minimalistic-assert’: [ ‘1.0.1’ ],
69 silly audit minimist: [ ‘1.2.8’ ],
69 silly audit mkdirp: [ ‘0.5.6’ ],
69 silly audit mysql: [ ‘2.18.1’ ],
69 silly audit negotiator: [ ‘0.6.3’ ],
69 silly audit ‘node-schedule’: [ ‘2.1.1’ ],
69 silly audit nodemon: [ ‘2.0.20’ ],
69 silly audit ‘supports-color’: [ ‘5.5.0’, ‘7.2.0’ ],
69 silly audit nopt: [ ‘1.0.10’ ],
69 silly audit ‘normalize-path’: [ ‘3.0.0’ ],
69 silly audit ‘object-assign’: [ ‘4.1.1’ ],
69 silly audit ‘object-inspect’: [ ‘1.12.3’ ],
69 silly audit ‘on-finished’: [ ‘2.4.1’ ],
69 silly audit ‘on-headers’: [ ‘1.0.2’ ],
69 silly audit once: [ ‘1.4.0’ ],
69 silly audit parseurl: [ ‘1.3.3’ ],
69 silly audit ‘path-is-absolute’: [ ‘1.0.1’ ],
69 silly audit ‘path-parse’: [ ‘1.0.7’ ],
69 silly audit ‘path-to-regexp’: [ ‘0.1.7’ ],
69 silly audit ‘pg-connection-string’: [ ‘2.5.0’ ],
69 silly audit picomatch: [ ‘2.3.1’ ],
69 silly audit ‘process-nextick-args’: [ ‘2.0.1’ ],
69 silly audit ‘proxy-addr’: [ ‘2.0.7’ ],
69 silly audit ‘pstree.remy’: [ ‘1.1.8’ ],
69 silly audit qs: [ ‘6.11.0’ ],
69 silly audit ‘random-bytes’: [ ‘1.0.0’ ],
69 silly audit ‘range-parser’: [ ‘1.2.1’ ],
69 silly audit ‘raw-body’: [ ‘2.5.1’ ],
69 silly audit ‘readdir-glob’: [ ‘1.1.2’ ],
69 silly audit readdirp: [ ‘3.6.0’ ],
69 silly audit rechoir: [ ‘0.8.0’ ],
69 silly audit resolve: [ ‘1.22.1’ ],
69 silly audit ‘resolve-from’: [ ‘5.0.0’ ],
69 silly audit retry: [ ‘0.12.0’ ],
69 silly audit rimraf: [ ‘2.7.1’ ],
69 silly audit ‘safer-buffer’: [ ‘2.1.2’ ],
69 silly audit semver: [ ‘5.7.1’, ‘7.0.0’ ],
69 silly audit send: [ ‘0.18.0’ ],
69 silly audit ‘serve-static’: [ ‘1.15.0’ ],
69 silly audit ‘session-file-store’: [ ‘1.5.0’ ],
69 silly audit universalify: [ ‘0.1.2’, ‘2.0.0’ ],
69 silly audit setimmediate: [ ‘1.0.5’ ],
69 silly audit setprototypeof: [ ‘1.2.0’ ],
69 silly audit ‘side-channel’: [ ‘1.0.4’ ],
69 silly audit ‘signal-exit’: [ ‘3.0.7’ ],
69 silly audit ‘simple-update-notifier’: [ ‘1.1.0’ ],
69 silly audit ‘socket.io’: [ ‘4.6.0’ ],
69 silly audit ‘socket.io-adapter’: [ ‘2.5.2’ ],
69 silly audit ‘socket.io-parser’: [ ‘4.2.2’ ],
69 silly audit ‘sorted-array-functions’: [ ‘1.3.0’ ],
69 silly audit sqlstring: [ ‘2.3.1’ ],
69 silly audit statuses: [ ‘2.0.1’ ],
69 silly audit streamsearch: [ ‘1.1.0’ ],
69 silly audit ‘supports-preserve-symlinks-flag’: [ ‘1.0.0’ ],
69 silly audit ‘tar-stream’: [ ‘2.2.0’ ],
69 silly audit tarn: [ ‘3.0.2’ ],
69 silly audit tildify: [ ‘2.0.0’ ],
69 silly audit ‘to-regex-range’: [ ‘5.0.1’ ],
69 silly audit toidentifier: [ ‘1.0.1’ ],
69 silly audit touch: [ ‘3.1.0’ ],
69 silly audit traverse: [ ‘0.3.9’ ],
69 silly audit ‘type-is’: [ ‘1.6.18’ ],
69 silly audit ‘typedarray-to-buffer’: [ ‘3.1.5’ ],
69 silly audit ‘uid-safe’: [ ‘2.1.5’ ],
69 silly audit undefsafe: [ ‘2.0.5’ ],
69 silly audit unpipe: [ ‘1.0.0’ ],
69 silly audit unzipper: [ ‘0.10.11’ ],
69 silly audit ‘util-deprecate’: [ ‘1.0.2’ ],
69 silly audit ‘utils-merge’: [ ‘1.0.1’ ],
69 silly audit uuid: [ ‘9.0.0’ ],
69 silly audit vary: [ ‘1.1.2’ ],
69 silly audit wrappy: [ ‘1.0.2’ ],
69 silly audit ‘write-file-atomic’: [ ‘3.0.3’ ],
69 silly audit ws: [ ‘8.11.0’ ],
69 silly audit ‘zip-stream’: [ ‘4.1.0’ ],
69 silly audit bufferutil: [ ‘4.0.7’ ],
69 silly audit nodemailer: [ ‘6.9.1’ ],
69 silly audit ‘utf-8-validate’: [ ‘6.0.2’ ],
69 silly audit ‘node-gyp-build’: [ ‘4.6.0’ ]
69 silly audit }
70 verbose reify failed optional dependency /home/wwwtrip/nodevenv/app/16/lib/node_modules/fsevents
71 silly reify mark deleted [ ‘/home/wwwtrip/nodevenv/app/16/lib/node_modules/fsevents’ ]
72 timing reifyNode:node_modules/fsevents Completed in 6ms
73 silly tarball no local data for nodemailer@https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.1.tgz. Extracting by manifest.
74 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 129ms
75 timing auditReport:getReport Completed in 138ms
76 silly audit report {}
77 timing auditReport:init Completed in 0ms
78 timing reify:audit Completed in 148ms
79 timing reifyNode:node_modules/node-gyp-build Completed in 176ms
80 timing reifyNode:node_modules/bufferutil Completed in 617ms
81 timing reifyNode:node_modules/utf-8-validate Completed in 625ms
82 http fetch GET 200 https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.1.tgz 574ms (cache miss)
83 timing reifyNode:node_modules/nodemailer Completed in 636ms
84 timing reify:unpack Completed in 638ms
85 timing reify:unretire Completed in 0ms
86 timing build:queue Completed in 1ms
87 timing build:link:node_modules/node-gyp-build Completed in 2ms
88 timing build:link Completed in 2ms
89 info run bufferutil@4.0.7 install node_modules/bufferutil node-gyp-build
90 info run utf-8-validate@6.0.2 install node_modules/utf-8-validate node-gyp-build
91 info run bufferutil@4.0.7 install { code: null, signal: ‘SIGINT’ }
92 info run utf-8-validate@6.0.2 install { code: null, signal: ‘SIGINT’ }
93 timing reify:rollback:createSparse Completed in 20ms
94 timing reify:rollback:retireShallow Completed in 1ms
95 timing command:install Completed in 124869ms
96 verbose stack Error: command failed
96 verbose stack at ChildProcess. (/opt/alt/alt-nodejs16/root/usr/lib/node_modules/npm/node_modules.bundled/@npmcli/promise-spawn/lib/index.js:63:27)
96 verbose stack at ChildProcess.emit (node:events:513:28)
96 verbose stack at maybeClose (node:internal/child_process:1093:16)
96 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
97 verbose pkgid bufferutil@4.0.7
98 verbose cwd /home/wwwtrip/app
99 verbose Linux 3.10.0-962.3.2.lve1.5.73.el7.x86_64
100 verbose node v16.17.1
101 verbose npm v8.15.0
102 error path /home/wwwtrip/nodevenv/app/16/lib/node_modules/bufferutil
103 error command failed
104 error signal SIGINT
105 error command sh /tmp/install-d7c23e24.sh
106 verbose exit 1
107 timing npm Completed in 125379ms
108 verbose unfinished npm timer reify 1676445514015
109 verbose unfinished npm timer reify:build 1676445517459
110 verbose unfinished npm timer build 1676445517460
111 verbose unfinished npm timer build:deps 1676445517460
112 verbose unfinished npm timer build:run:install 1676445517464
113 verbose unfinished npm timer build:run:install:node_modules/bufferutil 1676445517464
114 verbose unfinished npm timer build:run:install:node_modules/utf-8-validate 1676445517508
115 verbose code 1
116 error A complete log of this run can be found in:
116 error /home/wwwtrip/.npm/_logs/2023-02-15T07_18_33_504Z-debug-0.log

Any help would be most appreciated!

If you are interested in just moving forward, you can get a free postmark account and send via an api action.

I like your thinking! Will look into this.

Going back to basics here and taking a different tack. In the cpanel section of this post it describes the importance of creating a folder in the root (for example nodejsapp) and setting it as the root in your project. What is your folder structure?

Make sure that you don’t upload the node_modules folder from your computer to the server, if there is a node_modules folder delete it first before starting npm install. Run npm install from the cpanel environment if it is available there.

1 Like

my experience… … from PHP to NODE… and back to PHP… if you don’t need REALTIME data… with Sockets… then just stick to good old faithful php…

Node is great… dont get me wrong… i could see the benefits of templating and so on… but i was limited regarding servers (in my case) … and and… and costs … ect ect and limited to cloud hosting with data centers with hudge latency issues… :frowning:

But everything you can do with node you can do with php … but not sockets realtime data…

What I did on cloud hosting (node) for your mailer issues… just use an external SMTP host for handling the mail… eg sendgrid or something…

Hi @Heather_Mann ,

It looks like the error is related to the nodemailer module not being found, despite being listed in the package.json file and present in the mail.js file on the server. There could be a few reasons why this is happening.

  • First, please check if nodemailer is installed and included as a dependency in the package.json file. You can do this by running npm list nodemailer in the terminal. If it’s not installed, please run npm install nodemailer --save to add it as a dependency.

  • Another potential issue could be related to running the app from the wrong directory. Ensure that you’re running the app from the correct directory.

  • If nodemailer is installed globally, try installing it locally instead. Run “npm uninstall -g nodemailer” to remove the global installation, then run npm install nodemailer --save to install it locally in the app’s node_modules folder.

  • Lastly, if the above solutions don’t work, you can try deleting the node_modules folder and reinstalling all dependencies with npm install.

I hope this helps you resolve the issue.

I think the files are set up correctly?

Hey - Thanks for the suggestions.

Nodemailer is installed…

I believe app is in the correct place - see response to Ben.

I deleted the global nodemailer install and installed local but that didn’t fix the problem.

I also deleted the node_modules folder and reinstalled. Unfortunately that didn’t work either.

Did you check if there are any errors in the path where this module is called? In general, such problems are caused by a simple reason that is always overlooked.

Structure looks exactly as it should Heather, I was concerned the error was due to a path issue but i guess not

Brian

Thanks for trying! I might just need to use an external mail service, or go back to PHP.

Like you, I was sceptical about moving to node BUT it really is a great move.
How far down the project are you?
Could you recreate your server I case it’s a server config issue.
Have you tried a new site to see if its caused by some corruption?
I really recommend you stick with node although I understand business pressures may dictate you have to go in another direction.