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

Error when try to execute htmplar dev #40

Open
cr0hn opened this issue Sep 20, 2023 · 2 comments
Open

Error when try to execute htmplar dev #40

cr0hn opened this issue Sep 20, 2023 · 2 comments

Comments

@cr0hn
Copy link

cr0hn commented Sep 20, 2023

Node/npm version(s):

> npm -v
9.8.0

Package(s) version(s):

> cat package.json

{
  "name": "xxxx",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "htmplar-server": "htmplar serve",
    "htmplar-dev": "htmplar dev",
    "dev": "next dev  ",
    "build": "next build",
    "start": "next start",
    "lint": "next lint",
    "prepare": "husky install"
  },
  "dependencies": {
    "@fingerprintjs/fingerprintjs": "^3.4.2",
    "@headlessui/react": "^1.7.15",
    "@heroicons/react": "^2.0.18",
    "autoprefixer": "10.4.14",
    "htmplar": "^0.3.3",
    "moment": "^2.29.4",
    "next": "13.4.9",
    "next-translate": "^2.4.4",
    "postcss": "8.4.24",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "tailwindcss": "3.3.2",
    "typescript": "5.1.3"
  },
  "devDependencies": {
    "@tailwindcss/forms": "^0.5.3",
    "@types/node": "20.3.1",
    "@types/react": "18.2.12",
    "@types/react-dom": "18.2.5",
    "@typescript-eslint/eslint-plugin": "^6.1.0",
    "@typescript-eslint/parser": "^6.1.0",
    "eslint": "^8.43.0",
    "eslint-config-next": "13.4.5",
    "eslint-config-prettier": "^8.8.0",
    "eslint-plugin-prettier": "^4.2.1",
    "husky": "^8.0.0",
    "next-translate-plugin": "^2.4.4",
    "prettier": "^2.8.8"
  }
}

Description of the issue observed:

When I try to execute the command htmplar-dev or htmplar dev it raises this error:

> yarn run htmplar-dev
yarn run v1.22.19
$ htmplar dev
node_modules/htmplar/src/utils/walker.js:11
  if (exclude.length <= 0 || !exclude.includes(dirPath)) {
              ^

TypeError: Cannot read properties of undefined (reading 'length')
    at walkSync (node_modules/htmplar/src/utils/walker.js:11:15)
    at Object.<anonymous> (node_modules/htmplar/src/server/page.js:70:1)
    at Module._compile (node:internal/modules/cjs/loader:1233:14)
    at Module._compile (node_modules/pirates/lib/index.js:117:24)
    at Module._extensions..js (node:internal/modules/cjs/loader:1287:10)
    at Object.newLoader [as .js] (node_modules/pirates/lib/index.js:121:7)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at require (node:internal/modules/helpers:130:18)
    at Object.<anonymous> (node_modules/htmplar/src/server/index.js:6:15)
    at Module._compile (node:internal/modules/cjs/loader:1233:14)
    at Module._compile (node_modules/pirates/lib/index.js:117:24)
    at Module._extensions..js (node:internal/modules/cjs/loader:1287:10)
    at Object.newLoader [as .js] (node_modules/pirates/lib/index.js:121:7)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at require (node:internal/modules/helpers:130:18)
    at Object.<anonymous> (node_modules/htmplar/src/cli/index.js:8:13)
    at Module._compile (node:internal/modules/cjs/loader:1233:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1287:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
    at node:internal/main/run_main_module:23:47

Node.js v20.5.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Some example to reproduce the issue:

@AmeyDagaria007
Copy link
Contributor

Hi @cr0hn I have raised a PR for this can you please review #41.

Issue :- Exlude array was not defined in base template

@cr0hn
Copy link
Author

cr0hn commented Nov 17, 2023

Thank! I'll review it and tell you

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

2 participants