adobe / helix-cli

Command-line tools for developing with AEM
Apache License 2.0
50 stars 61 forks source link

Regression: hlx up of a project with no src does not render md files #1027

Closed kptdobe closed 5 years ago

kptdobe commented 5 years ago

To Reproduce Steps to reproduce the behavior:

  1. mkdir test
  2. cd test
  3. vi index.md and dump # Hello world in the file
  4. hlx up

Output:

(node:90536) ExperimentalWarning: The fs.promises API is experimental
    __ __    ___       ___                  
   / // /__ / (_)_ __ / _ \___ ____ ____ ___
  / _  / -_) / /\ \ // ___/ _ `/ _ `/ -_|_-<
 /_//_/\__/_/_//_\_\/_/   \_,_/\_, /\__/___/
                              /___/ v4.6.0

Checking out sources from https://github.com/adobe/helix-pages.git#master
Running npm install for helix-pages@1.0.0...
added 8 packages from 13 contributors in 1.336s
Debugger listening on ws://127.0.0.1:9229/24e77d53-64dd-45f2-9b9f-15bf4347231b
For help, see: https://nodejs.org/en/docs/inspector
Building project files...done 1200ms
[hlx] info: Starting helix-simulator v2.12.13
[hlx] info: Local Helix Dev server up and running: http://localhost:3000/
[git] info: [90536] HTTP: listening on port 49913
[git] error: encountered unhandled promise rejection at process level: [object Promise], reason: Error: Cannot find module 'request'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
    at Function.Module._load (internal/modules/cjs/loader.js:508:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (/Users/alex/.nvm/versions/node/v10.15.3/lib/node_modules/@adobe/helix-cli/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at /Users/alex/work/dev/helix/tmp/.hlx/pages/master/node_modules/request-promise-native/lib/rp.js:8:12
    at module.exports (/Users/alex/work/dev/helix/tmp/.hlx/pages/master/node_modules/stealthy-require/lib/index.js:62:23)
    at Object.<anonymous> (/Users/alex/work/dev/helix/tmp/.hlx/pages/master/node_modules/request-promise-native/lib/rp.js:7:15)
    at Module._compile (/Users/alex/.nvm/versions/node/v10.15.3/lib/node_modules/@adobe/helix-cli/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)

No rendering.

Expected behavior Hello world in the index.html page

Version: run: $ hlx --version 4.6.0

kptdobe commented 5 years ago

Running hlx up in the local helix-pages clone (.hlx/pages/master/) works as expected (issue is not helix-pages related but on how the cli uses it).

kptdobe commented 5 years ago

From https://github.com/request/request-promise-native#installation:

request is defined as a peer-dependency and thus has to be installed separately.

helix-pages must install request so that dependencies are correct. https://github.com/adobe/helix-pages/issues/49 should fix this issue.

kptdobe commented 5 years ago

adobe/helix-pages#49 fixes the issue.