foundation-emails icon indicating copy to clipboard operation
foundation-emails copied to clipboard

npm run build gives errno1, code ELIFECYCLE

Open shepherdabdullah opened this issue 3 years ago • 9 comments

I am trying to use foundation for html email development. Using a cloned framework email file I run npm install in the project folder and when I run npm run start it works fine and opens up the browser displaying templates. When I go to run npm run build I get the following result follow by an error.

[email protected] build /home/abdullah/Desktop/projects/frame-email gulp --production

[08:25:57] Failed to load external module @babel/register [08:25:57] Requiring external module babel-register [08:25:57] Using gulpfile ~/Desktop/projects/frame-email/gulpfile.babel.js [08:25:57] Starting 'default'... [08:25:57] Starting 'build'... [08:25:57] Starting 'clean'... [08:25:57] Finished 'clean' after 28 ms [08:25:57] Starting 'pages'... [08:25:58] Finished 'pages' after 882 ms [08:25:58] Starting 'sass'... Auto configuration failed 140605912164288:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libproviders.so): libproviders.so: cannot open shared object file: No such file or directory 140605912164288:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244: 140605912164288:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=providers, path=providers 140605912164288:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=providers [08:25:59] 'sass' errored after 341 ms [08:25:59] Error in plugin 'gulp-uncss' Message: Auto configuration failed 140605912164288:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libproviders.so): libproviders.so: cannot open shared object file: No such file or directory 140605912164288:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244: 140605912164288:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=providers, path=providers 140605912164288:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=providers

Details: domainEmitter: [object Object] domain: [object Object] domainThrown: false [08:25:59] 'build' errored after 1.25 s [08:25:59] 'default' errored after 1.26 s npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] build: gulp --production npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/abdullah/.npm/_logs/2022-10-09T13_25_59_149Z-debug.log

When I install foundation globally and run foundation new --framework emails I get a different result

/home/abdullah/.nvm/versions/node/v10.0.0/lib/node_modules/foundation-cli/node_modules/string-kit/lib/unicode.js:237 return emojiWidthLookup.get( code ) ?? 2 ; ^

SyntaxError: Unexpected token ? at new Script (vm.js:74:7) at createScript (vm.js:246:10) at Object.runInThisContext (vm.js:298:10) at Module._compile (internal/modules/cjs/loader.js:646:28) at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10) at Module.load (internal/modules/cjs/loader.js:589:32) at tryModuleLoad (internal/modules/cjs/loader.js:528:12) at Function.Module._load (internal/modules/cjs/loader.js:520:3) at Module.require (internal/modules/cjs/loader.js:626:17) at require (internal/modules/cjs/helpers.js:20:18)

I've also had it ask me to try to install yarn manually as well even when I had yarn installed globally. Very confused and very stuck. Anyone have any advice of what I could try to fix this?

shepherdabdullah avatar Oct 09 '22 13:10 shepherdabdullah

I never figured this out, but for anyone curious how to get around these issues. You can use foundation by just cloning the git repo from here https://github.com/foundation/foundation-emails or the older version from here https://github.com/foundation/foundation-emails-template and renaming it to the name of your project, using terminal to cd into the project, and running npm install. Both npm run start and run build should both work properly. Using nodev10 with node version manager made things work a lot smoother in my experience though I do not know exactly why. From just what I could guess many of these issues result from missing dependencies or conflicts with the version of node being used.

shepherdabdullah avatar Oct 15 '22 16:10 shepherdabdullah

chage on package.json line 43 "gulp-sass": "^4.1.0", use node.js v14.15.0

Ihornechypor avatar Oct 17 '22 16:10 Ihornechypor

No luck still unfortunately.

This is what shows in the terminal

shepherdabdullah@shepherdabdullah-VirtualBox:~/Desktop/projects/frame-email$ npm run build

[email protected] build /home/shepherdabdullah/Desktop/projects/frame-email gulp --production

[10:54:35] Failed to load external module @babel/register [10:54:35] Requiring external module babel-register [10:54:36] Using gulpfile ~/Desktop/projects/frame-email/gulpfile.babel.js [10:54:36] Starting 'default'... [10:54:36] Starting 'build'... [10:54:36] Starting 'clean'... [10:54:36] Finished 'clean' after 32 ms [10:54:36] Starting 'pages'... [10:54:37] Finished 'pages' after 1.13 s [10:54:37] Starting 'sass'... Auto configuration failed 140174424012736:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libproviders.so): libproviders.so: cannot open shared object file: No such file or directory 140174424012736:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244: 140174424012736:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=providers, path=providers 140174424012736:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=providers [10:54:37] 'sass' errored after 382 ms [10:54:37] Error in plugin 'gulp-uncss' Message: Auto configuration failed 140174424012736:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libproviders.so): libproviders.so: cannot open shared object file: No such file or directory 140174424012736:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244: 140174424012736:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=providers, path=providers 140174424012736:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=providers

Details: domainEmitter: [object Object] domainThrown: false [10:54:37] 'build' errored after 1.54 s [10:54:37] 'default' errored after 1.55 s npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] build: gulp --production npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/shepherdabdullah/.npm/_logs/2022-10-18T15_54_37_871Z-debug.log

shepherdabdullah avatar Oct 18 '22 16:10 shepherdabdullah

@shepherdabdullah Same error here, have you find out the root cause of this problem?

elvismdev avatar Jan 14 '23 04:01 elvismdev

Are you using a windows vm to run linux for your development environment? No matter what I tried I could not get it working in in any distro of linux in oracle's vbox. I found that using ubuntu 20.04.5 LTS with WSL made it run fine all of a sudden for me. I think I also used a node v10.

Have you tried the solution mentioned by Ihornechypor in this thread? I also have a work around that I posted in this thread as well I you are unable to get it going otherwise.

From what I could tell it's an error due to an error in the package.json file or due to missing dependencies.

shepherdabdullah avatar Jan 14 '23 16:01 shepherdabdullah

Are you using a windows vm to run linux for your development environment? No matter what I tried I could not get it working in in any distro of linux in oracle's vbox. I found that using ubuntu 20.04.5 LTS with WSL made it run fine all of a sudden for me. I think I also used a node v10.

Have you tried the solution mentioned by Ihornechypor in this thread? I also have a work around that I posted in this thread as well I you are unable to get it going otherwise.

From what I could tell it's an error due to an error in the package.json file or due to missing dependencies.

Hi @shepherdabdullah , no I'm not using a VM. I develop from my laptop using native regular Ubuntu 22.04.1 LTS installed.

I did tried both workarounds mentioned above by you and @Ihornechypor but still got the same results.

For greater context of what my setup looks like for the project where I'm having this same issue, I'm pasting below the contents of the package.json file:

{
  "name": "foundation-emails-template",
  "version": "2.4.0",
  "description": "Basic template for a Foundation for Emails project.",
  "repository": "foundation/foundation-emails-template",
  "main": "gulpfile.babel.js",
  "scripts": {
    "start": "gulp",
    "build": "gulp --production",
    "zip": "gulp zip --production",
    "litmus": "gulp litmus --production",
    "mail": "gulp mail --production"
  },
  "author": "Foundation <[email protected]> (https://get.foundation)",
  "license": "MIT",
  "dependencies": {
    "foundation-emails": "^2.4.0"
  },
  "devDependencies": {
    "babel-core": "^6.3.26",
    "babel-preset-es2015": "^6.3.13",
    "babel-register": "^6.7.2",
    "beepbeep": "^1.2.0",
    "browser-sync": "^2.11.0",
    "colors": "^1.1.2",
    "gulp": "^4.0.0",
    "gulp-autoprefixer": "^7.0.1",
    "gulp-awspublish": "^3.0.1",
    "gulp-cached": "^1.1.0",
    "gulp-cli": "^1.1.0",
    "gulp-concat": "^2.6.0",
    "gulp-html-src": "^1.0.0",
    "gulp-htmlmin": "^5.0.1",
    "gulp-if": "^3.0.0",
    "gulp-imagemin": "^2.4.0",
    "gulp-inject-string": "^1.1.0",
    "gulp-inline-css": "^3.4.0",
    "gulp-litmus": "0.0.7",
    "gulp-load-plugins": "^2.0.1",
    "gulp-mail": "^0.1.1",
    "gulp-postcss": "^8.0.0",
    "gulp-prettify": "^0.5.0",
    "gulp-prompt": "^1.2.0",
    "gulp-rename": "^1.2.2",
    "gulp-replace": "^0.5.4",
    "gulp-rsync": "^0.1.0",
    "gulp-sass": "^4.1.0",
    "gulp-sass-lint": "^1.4.0",
    "gulp-sourcemaps": "^2.6.5",
    "gulp-uncss": "^1.0.1",
    "gulp-wrap": "^0.15.0",
    "gulp-zip": "^5.0.1",
    "inky": "^1.4.1",
    "lazypipe": "^1.0.1",
    "merge-stream": "^1.0.0",
    "panini": "^1.3.0",
    "rimraf": "^2.3.3",
    "sass": "^1.35.2",
    "siphon-media-query": "^1.0.0",
    "yargs": "^4.1.0"
  },
  "babel": {
    "presets": [
      "es2015"
    ]
  }
}

elvismdev avatar Jan 14 '23 21:01 elvismdev

OS: Fedora 37 Node: NVM v10.24.1

In the package file.json changed the "scripts" section:

"scripts": {
    "start": "gulp",
    "build": "export OPENSSL_CONF=/dev/null && gulp --production",
    "zip": "export OPENSSL_CONF=/dev/null && gulp zip --production",
    "litmus": "export OPENSSL_CONF=/dev/null && gulp litmus --production",
    "mail": "export OPENSSL_CONF=/dev/null && gulp mail --production"
}

It works for me. I spied the advice here https://github.com/foundation/foundation-emails/issues/1124#issuecomment-1265609546

webmaxx avatar Jan 26 '23 20:01 webmaxx

OS: Fedora 37 Node: NVM v10.24.1

In the package file.json changed the "scripts" section:

"scripts": {
    "start": "gulp",
    "build": "export OPENSSL_CONF=/dev/null && gulp --production",
    "zip": "export OPENSSL_CONF=/dev/null && gulp zip --production",
    "litmus": "export OPENSSL_CONF=/dev/null && gulp litmus --production",
    "mail": "export OPENSSL_CONF=/dev/null && gulp mail --production"
}

It works for me. I spied the advice here #1124 (comment)

This was it. Thanks @webmaxx !

elvismdev avatar Jan 28 '23 05:01 elvismdev

OS: Fedora 37 Node: NVM v10.24.1

In the package file.json changed the "scripts" section:

"scripts": {
    "start": "gulp",
    "build": "export OPENSSL_CONF=/dev/null && gulp --production",
    "zip": "export OPENSSL_CONF=/dev/null && gulp zip --production",
    "litmus": "export OPENSSL_CONF=/dev/null && gulp litmus --production",
    "mail": "export OPENSSL_CONF=/dev/null && gulp mail --production"
}

It works for me. I spied the advice here #1124 (comment)

holy guacamole, this worked. Thanks so much. Now to fix the autorefresh, getting there slowly but surely!

iLiketurtles3000 avatar Feb 05 '23 09:02 iLiketurtles3000