question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to run create-ink-app --typescript project

See original GitHub issue

Following the getting started guide:

user@DESKTOP-CFOTQL1:~/projects/foo$ npx create-ink-app --typescript
user@DESKTOP-CFOTQL1:~/projects/foo$ npm run start

> foo@0.0.0 start /home/user/projects/foo
> npm run build && dist/cli.js


> foo@0.0.0 build /home/user/projects/foo
> tsc

(node:19237) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
/home/user/projects/foo/dist/cli.js:2
import React from 'react';
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at wrapSafe (internal/modules/cjs/loader.js:979:16)
    at Module._compile (internal/modules/cjs/loader.js:1027:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! foo@0.0.0 start: `npm run build && dist/cli.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the foo@0.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/user/.npm/_logs/2021-05-04T21_25_50_771Z-debug.log

Using node version 14.16.1 lts

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:6
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
Caryyoncommented, May 6, 2021

Getting similar issues but about meow Screen Shot 2021-05-05 at 8 22 53 PM I’ve made it known there as well meow:172

3reactions
iamjaredwalterscommented, Jun 14, 2021

Anything I can do to help move this along?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to create React typescript project - Stack Overflow
Try updating your local create-react-app version to >=2.1 ... Then create your react app with typescript using below command.
Read more >
Can't Scaffold TypeScript Project Anymore... #12443 - GitHub
When I run the command: npx create-react-app cra-example-app --template typescript it ends with this strange message and creates some ...
Read more >
Tutorial: Create a Node.js and React app in Visual Studio
Learn how to create a Node.js web application project from a Visual ... and TypeScript compiler options; Transpile the JSX; Run the app...
Read more >
create-react-app: command not found (React) error [Solved]
Use npx to solve the error "create-react-app: command not found", e.g. npx create-react-app my-app or install the package globally by running npm install...
Read more >
Create React App and TypeScript: A Quick How-To | Built In
Let's take a look at creating a new React app that uses TypeScript from the jump, and convert an existing project from JavaScript...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found