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

Skott own modules are not installed #16

Closed
bam-charlesbo opened this issue Dec 18, 2022 · 5 comments · Fixed by #17
Closed

Skott own modules are not installed #16

bam-charlesbo opened this issue Dec 18, 2022 · 5 comments · Fixed by #17

Comments

@bam-charlesbo
Copy link

bam-charlesbo commented Dec 18, 2022

Hi,
Thanks for your work.
I've installed your package globally but I get an error

Error

➜  sgo ✗ skott src/App.tsx

 Running Skott from entrypoint: src/App.tsx
 Processed 1 file (2.285ms)
 ✓ no circular dependencies found (depth=Infinity)
 Third-party dependencies: ❌
 --> Use --trackThirdPartyDependencies to enable tracking.
 Built-in dependencies: ❌
 --> Use --trackBuiltinDependencies to enable tracking.
 Type-level only dependencies: ✅

 Skott exited with code 1
node:fs:1438
  handleErrorFromBinding(ctx);
  ^

Error: ENOENT: no such file or directory, scandir '/Users/aze/.config/yarn/global/node_modules/skott/node_modules/skott-webapp/dist'
    at readdirSync (node:fs:1438:3)
    at totalist (/Users/aze/.config/yarn/global/node_modules/totalist/sync/index.js:6:12)
    at module.exports (/Users/aze/.config/yarn/global/node_modules/sirv/build.js:149:3)
    at openWebApplication (file:///Users/aze/.config/yarn/global/node_modules/skott/dist/bin/ui/webapp.js:45:20)
    at displaySkott (file:///Users/aez/.config/yarn/global/node_modules/skott/dist/bin/main.js:134:9) {
  errno: -2,
  syscall: 'scandir',
  code: 'ENOENT',
  path: '/Users/aze/.config/yarn/global/node_modules/skott/node_modules/skott-webapp/dist'
}

I checked here /Users/aze/.config/yarn/global/node_modules/skott and found out that packages are not installed.
Tried to install them myself using yarn installbut I end up on a maybe encrypted variable @skott%2fconfig

Yarn-error.log

Arguments: 
  /Users/aze/.nvm/versions/node/v16.19.0/bin/node /opt/homebrew/Cellar/yarn/1.22.19/libexec/bin/yarn.js install

PATH: 
  /Users/aze/.nvm/versions/node/v16.19.0/bin:/Users/aze/.rbenv/shims:/Users/aze/Library/Caches/fnm_multishells/1122_1671351776860/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin:/Users/aze/Library/Android/sdk/emulator:/Users/aze/Library/Android/sdk/platform-tools:/Users/aze/Library/Android/sdk/tools:/Users/aze/Library/Android/sdk/tools/bin

Yarn version: 
  1.22.19

Node version: 
  16.19.0

Platform: 
  darwin arm64

Trace: 
  Error: https://registry.yarnpkg.com/@skott%2fconfig: Not found
      at Request.params.callback [as _callback] (/opt/homebrew/Cellar/yarn/1.22.19/libexec/lib/cli.js:66145:18)
      at Request.self.callback (/opt/homebrew/Cellar/yarn/1.22.19/libexec/lib/cli.js:140890:22)
      at Request.emit (node:events:513:28)
      at Request.<anonymous> (/opt/homebrew/Cellar/yarn/1.22.19/libexec/lib/cli.js:141862:10)
      at Request.emit (node:events:513:28)
      at IncomingMessage.<anonymous> (/opt/homebrew/Cellar/yarn/1.22.19/libexec/lib/cli.js:141784:12)
      at Object.onceWrapper (node:events:627:28)
      at IncomingMessage.emit (node:events:525:35)
      at endReadableNT (node:internal/streams/readable:1358:12)
      at processTicksAndRejections (node:internal/process/task_queues:83:21)

npm manifest: 
  {
    "name": "skott",
    "version": "0.12.1",
    "description": "Automatically construct and visualize Graphs generated from your JavaScript and TypeScript project",
    "author": "Antoine Coulon",
    "license": "MIT",
    "repository": {
      "type": "git",
      "url": "git+https://github.com/antoine-coulon/skott.git"
    },
    "bugs": {
      "url": "https://github.com/antoine-coulon/skott/issues"
    },
    "main": "dist/index.js",
    "bin": {
      "skott": "./dist/bin/cli.js"
    },
    "type": "module",
    "exports": {
      ".": "./dist/index.js"
    },
    "types": "./dist/index.d.ts",
    "dependencies": {
      "@typescript-eslint/typescript-estree": "^5.40.0",
      "compression": "^1.7.4",
      "digraph-js": "^2.0.2",
      "estree-walker": "^3.0.1",
      "fs-tree-structure": "0.0.1",
      "kleur": "^4.1.5",
      "ligie": "^0.0.6",
      "meriyah": "^4.2.1",
      "openurl": "^1.1.1",
      "ora": "^6.1.2",
      "polka": "^0.5.2",
      "sade": "^1.8.1",
      "sirv": "^2.0.2",
      "skott-webapp": "0.0.3",
      "table": "^6.8.0"
    },
    "devDependencies": {
      "@nodesecure/eslint-config": "^1.3.0",
      "@skott/config": "0.0.1",
      "@types/chai": "^4.3.0",
      "@types/compression": "^1.7.2",
      "@types/mocha": "^9.0.0",
      "@types/node": "^16.11.12",
      "@types/polka": "^0.5.4",
      "@types/sade": "^1.7.4",
      "chai": "^4.3.4",
      "eslint": "^8.4.1",
      "eslint-config-prettier": "^8.3.0",
      "eslint-import-resolver-typescript": "^2.5.0",
      "eslint-plugin-import": "^2.26.0",
      "eslint-plugin-prettier": "^4.0.0",
      "memfs": "^3.4.6",
      "mocha": "^9.1.4",
      "prettier": "^2.5.1",
      "rimraf": "^3.0.2",
      "ts-node": "^10.8.1",
      "typescript": "^4.5.2"
    },
    "files": [
      "dist",
      "./README.md"
    ],
    "keywords": [
      "javascript",
      "graph",
      "nodejs",
      "visualization",
      "module",
      "dependencies"
    ],
    "scripts": {
      "build": "rimraf ./dist && tsc --project tsconfig.build.json",
      "lint": "eslint .",
      "prestart": "pnpm run build",
      "start": "node dist/bin/cli.js",
      "test": "mocha --parallel"
    }
  }

yarn manifest: 
  No manifest

Lockfile: 
  No lockfile

Any idea how to solve this ?

@antoine-coulon
Copy link
Owner

@bam-charlesbo Hi, thanks for reporting that issue. I usually try with npm and pnpm and it seems to work as of now, could you tell me if this works for you by installing the package using npm please?
Might be a specific issue related to Yarn, so I'd be happy to solve that very quickly
FYI if you want to test skott without the webapp, you can supply another displayMode e.g: skott --displayMode=file-tree or skott --displayMode=graph

@antoine-coulon
Copy link
Owner

antoine-coulon commented Dec 19, 2022

@bam-charlesbo it seems that it won't work when Skott is installed as a local dependency rather than a cli. I need to fix that path resolution for the dependency 'skott-webapp' which is the standalone package used to render the application.

I'll try to fix that asap. Could you confirm me that it works for you when installing Skott globally with another package manager than yarn?

Thanks for reporting that!

@antoine-coulon
Copy link
Owner

antoine-coulon commented Dec 19, 2022

@bam-charlesbo could you please try with the latest version I just published 0.12.2 and let me know if I can close this issue?

By the way from a user land perspective you're only supposed to install "skott", nothing else.

Thanks

@bam-charlesbo
Copy link
Author

Yes it works !

I updated the package and tried the same command.

Well done !

Thanks for your reactivity 🤘

@antoine-coulon
Copy link
Owner

antoine-coulon commented Dec 19, 2022

@bam-charlesbo happy to know it works now :) thanks again for reporting that!

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

Successfully merging a pull request may close this issue.

2 participants