-
Notifications
You must be signed in to change notification settings - Fork 4
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
Klap can't find typescript on init #198
Comments
Additionally, doing 🌊 /JS/klap $ npx klap init ts
internal/modules/cjs/loader.js:883
throw err;
^
Error: Cannot find module 'typescript'
Require stack:
- /JS/klap/node_modules/klap/dist/index.js
- /JS/klap/node_modules/klap/cli.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.975034 (/JS/klap/node_modules/klap/dist/index.js:723369:18)
at __webpack_require__ (/JS/klap/node_modules/klap/dist/index.js:723418:43)
at Object.956237 (/JS/klap/node_modules/klap/dist/index.js:607953:17)
at __webpack_require__ (/JS/klap/node_modules/klap/dist/index.js:723418:43)
at Module.600669 (/JS/klap/node_modules/klap/dist/index.js:694661:30)
at __webpack_require__ (/JS/klap/node_modules/klap/dist/index.js:723418:43) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/JS/klap/node_modules/klap/dist/index.js',
'/JS/klap/node_modules/klap/cli.js'
]
} |
Do you have TypeScript installed? |
Haha, new to the JS ecosystem so I thought that dependency would be handled automatically, my bad.
🌊 /JS/klap $ npx klap init ts
klap@6.1.1 - Initializing your package...
(node:19669) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'split' of undefined
at writePackage (/JS/klap/node_modules/klap/dist/index.js:722842:19)
at async init_init (/JS/klap/node_modules/klap/dist/index.js:722941:14)
at async /JS/klap/node_modules/klap/cli.js:18:4
(Use `node --trace-warnings ...` to show where the warning was created)
(node:19669) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:19669) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. Not sure this will affect my ability to use Klap. |
I think The Jingsin's project path (full path) will help solve this problem. |
This dependency should be handled automatically for you. It's not an user error. I will work on fixing this.
Do you happen to have a |
fix missing name from existing package.json with missing name property re #198
Ah, thank ya much! I have it working fine now, just working through some other issues in my repo that are probably unrelated to Klap. When I build my module, how would I flag Babel to fix things such as |
The class property transform is at stage-3, which means it's not a finalized feature for Javascript. You can find more information about the process here I am not going to support stage-3 features in |
Understandable, but is there a way to get Babel plugins working with Klap? Would I install the plugin and throw it into the |
The extensibility story for The problem with throwing a new Also, in future, I would like to move to |
I had looked into Thanks for your help anyway! 😄 |
klap needs typescript as a dependency for types and usets flags but not for init. this release fixes where typescript was incorrectly required during init fix #198
🎉 This issue has been resolved in version 6.1.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Howdy! I'm trying to get going with Klap, but upon making a new, empty directory (
mkdir klap
) and trying to run the typescript init (or even the non-typescript init) I get this error.Any advice to get this fixed?
The text was updated successfully, but these errors were encountered: