Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm run build gives errno1, code ELIFECYCLE #1127

Open
shepherdabdullah opened this issue Oct 9, 2022 · 9 comments
Open

npm run build gives errno1, code ELIFECYCLE #1127

shepherdabdullah opened this issue Oct 9, 2022 · 9 comments

Comments

@shepherdabdullah
Copy link

shepherdabdullah commented Oct 9, 2022

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
Copy link
Author

shepherdabdullah commented Oct 15, 2022

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.

@Ihornechypor
Copy link

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

@shepherdabdullah
Copy link
Author

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

@elvismdev
Copy link

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

@shepherdabdullah
Copy link
Author

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.

@elvismdev
Copy link

elvismdev commented Jan 14, 2023

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"
    ]
  }
}

@webmaxx
Copy link

webmaxx commented Jan 26, 2023

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)

@elvismdev
Copy link

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 !

@iLiketurtles3000
Copy link

iLiketurtles3000 commented Feb 5, 2023

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants