freenet-core icon indicating copy to clipboard operation
freenet-core copied to clipboard

npm error with ldt new on a fresh install

Open sanity opened this issue 2 years ago • 2 comments

Just running through the tutorial with a fresh install of locutus on Ubuntu:

$  ldt new web-app                                     (base)  Wed 10 May 2023 03:46:26 PM CDT
     Created library `/tmp/my-app/web/container` package
    Updating crates.io index
      Adding locutus-stdlib v0.0.3 to dependencies.
             Features:
             - arbitrary
             - archive
             - net
             - serde-wasm-bindgen
             - testing
             - tokio
             - tokio-tungstenite
             - trace
             - wasm-bindgen
             - web-sys
             - xz2
Wrote to /tmp/my-app/web/package.json:

{
  "name": "web",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}


npm WARN using --force Recommended protections disabled.
Error while executing npm command: No such file or directory (os error 2)
Error: CommandFailed("tsc")

sanity avatar May 10 '23 20:05 sanity

Looks like the fix is:

$ npm install typescript

I'll add this to the prerequisites in the tutorial, but I'll leave this issue open because this probably could use a better error for when tsc is missing.

sanity avatar May 10 '23 20:05 sanity

Probably adding typescript as a dependency of the package somewhere and installing before running anything else will fix the problem. Will need to check this out.

iduartgomez avatar May 12 '23 08:05 iduartgomez