-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
"premail init" failing #53
Comments
@CBoensel Thanks for the report! I've just pushed a new release that I believe will fix this: https://github.com/premail/premail/releases/tag/v2.0.3 Please let me know. |
@rootwork Thanks, just checked. But on another device now, still same specs though, node 12 through nvm this time. Seeing... premail init
internal/modules/cjs/loader.js:797
throw err;
^
Error: Cannot find module './gulpfile'
Require stack:
- C:\Users\carsten\AppData\Roaming\nvm\v12.13.0\node_modules\premail\index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)
at Function.Module._load (internal/modules/cjs/loader.js:687:27)
at Module.require (internal/modules/cjs/loader.js:849:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (C:\Users\carsten\AppData\Roaming\nvm\v12.13.0\node_modules\premail\index.js:9:15)
at Module._compile (internal/modules/cjs/loader.js:956:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
at Module.load (internal/modules/cjs/loader.js:812:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\carsten\\AppData\\Roaming\\nvm\\v12.13.0\\node_modules\\premail\\index.js'
]
} ...still. I'm going to drop my logs from the install this time: npm install -g premail
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
C:\Program Files\nodejs\premail -> C:\Program Files\nodejs\node_modules\premail\index.js
> fibers@5.0.0 install C:\Program Files\nodejs\node_modules\premail\node_modules\fibers
> node build.js || nodejs build.js
`win32-x64-72` exists; testing
Binary is fine; exiting
npm WARN notsup Unsupported engine for premail@2.0.3: wanted: {"node":"^12 || ^14 || ^16","npm":"^7 || ^8"} (current: {"node":"12.13.0","npm":"6.12.0"})
npm WARN notsup Not compatible with your version of node/npm: premail@2.0.3
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\premail\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules\premail\node_modules\mjml-cli\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules\premail\node_modules\sass\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules\premail\node_modules\mocha\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN node-sass-json-importer@4.3.0 requires a peer of node-sass@>=3.5.3 but none is installed. You must install peer dependencies yourself.
+ premail@2.0.3
added 1260 packages from 544 contributors and updated 6 packages in 77.355s Personally I think it might worth considering the "SKIPPING OPTIONAL DEPENDENCY" logs. Thanks for having a look. |
OK, I think I've got it now. Try https://github.com/premail/premail/releases/tag/v2.0.4 or the version now on npm. Turns out the error about not finding a file was actually a red herring; it was a mismatch in the node/npm requirements that had been set. I added a GitHub Action to test for this to make sure it doesn't happen again. I also fixed one internal path that may have failed on Windows. In terms of the "optional dependency" errors, this is a known npm thing. I agree it's annoying and confusingly prominent. Let me know how far you get with this version. |
Thanks, @rootwork! Just installed the patch. Sorry to say, but still internal/modules/cjs/loader.js:797
throw err;
^
Error: Cannot find module './gulpfile'
Require stack:
- C:\Users\carsten\AppData\Roaming\nvm\v12.13.0\node_modules\premail\index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)
at Function.Module._load (internal/modules/cjs/loader.js:687:27)
at Module.require (internal/modules/cjs/loader.js:849:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (C:\Users\carsten\AppData\Roaming\nvm\v12.13.0\node_modules\premail\index.js:9:15)
at Module._compile (internal/modules/cjs/loader.js:956:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
at Module.load (internal/modules/cjs/loader.js:812:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\carsten\\AppData\\Roaming\\nvm\\v12.13.0\\node_modules\\premail\\index.js'
]
} The issue isn't related to nvm, is it? Let me know what you need to trace things down please. I will try to help then. |
by the way, it's not just "init" failing... it's just the first thing I tried. |
First, try uninstalling and reinstalling npm uninstall premail -g
npm cache verify
npm install premail -g Then just to make sure we're on the same page, please run the following commands and share the output:
Then try running I'm using n rather than nvm, but I have used nvm in the past and haven't encountered these kinds of issues. Could be a possibility, though. I'm also noticing the double-backslashes in the Sorry this is persisting! |
So I know Windows server != a normal Windows install, but I added a test for Windows to my Node CI and it does appear to install and work on a Windows server (open the "Create a dummy project and build" job; ignore the double-reporting of the files created, I'm working to fix that). Not saying there couldn't still be cross-platform issues, but it's strange that it installs and runs on the Linux and Windows servers GitHub Actions uses but doesn't work locally. |
Thanks. "version": "2.0.4" see file attached for logs. |
I agree it's weird. |
@CBoensel Can you tell me if you see the file I think the problem might be the But first let's make sure that file actually exists, and it's just the reference that's bad. |
The gulpfile.js does not exist indeed. For whatever reason. Could I add it manually? Gulp is installed as a global dependency if that matters... |
You could, but it's far from the only file. I'm still investigating the path possibility, but given that the file doesn't exist I wonder if npm just isn't picking it up. I'll try explicitly adding it to the In the meantime, if you want to test premail, this should work: git clone https://github.com/premail/premail.git test
cd test
npm i And then to run premail, you would execute |
OK, try the latest version from npm - 2.0.5. I've explicitly included the |
Awesome! It's working now, just initialized my first premail project. Thanks for your help. Looking forward to eventually trying things out and templating my mail properly. :) Cheers |
Excellent! I'm so glad we figured this out. Please do continue to leave feedback if you find any bugs or want to request features! |
Issue closed and locked due to lack of activity. |
Support Question
System
Windows 10 x64, Node 12.x
Premail version
current / most recent
Your question
any idea why this is?
hint, installation of premail ended with warnings.
The text was updated successfully, but these errors were encountered: