nuxt / typescript

TypeScript Support for Nuxt 2

Home Page:https://typescript.nuxtjs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot find module '@nuxt/cli-edge'

343058360 opened this issue · comments

Normal operation under Windows; Docker packaging encountered an exception
Found execution error in @ nuxt/typescript runtime/bin/nuxt ts.js, unable to find @ nuxt/cli
But this @ nuxt/cli package does exis

Error: Cannot find module '@nuxt/cli-edge'
102.9 Require stack:
102.9 - /shopping-mall/node_modules/@nuxt/typescript-runtime/bin/nuxt-ts.js
102.9 at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
102.9 at Function.Module._load (internal/modules/cjs/loader.js:745:27)
102.9 at Module.require (internal/modules/cjs/loader.js:961:19)
102.9 at require (internal/modules/cjs/helpers.js:92:18)
102.9 at Object. (/shopping-mall/node_modules/@nuxt/typescript-runtime/bin/nuxt-ts.js:10:9)
102.9 at Module._compile (internal/modules/cjs/loader.js:1072:14)
102.9 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
102.9 at Module.load (internal/modules/cjs/loader.js:937:32)
102.9 at Function.Module._load (internal/modules/cjs/loader.js:778:12)
102.9 at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) {
102.9 code: 'MODULE_NOT_FOUND',
102.9 requireStack: [
102.9 '/shopping-mall/node_modules/@nuxt/typescript-runtime/bin/nuxt-ts.js'
102.9 ]
102.9 }

image

"dependencies": {
"@nuxt/typescript-runtime": "^3.0.2",

"devDependencies": {
"@nuxt/cli": "^2.16.1",
"@nuxt/types": "^2.17.4",
"@nuxt/typescript-build": "^3.0.2",

"dependencies": {
"@nuxt/typescript-runtime": "^3.0.2",

"devDependencies": {
"@nuxt/cli": "^2.16.1",
"@nuxt/types": "^2.17.4",
"@nuxt/typescript-build": "^3.0.2",

"nuxt": "^2.14.0",

Nuxt 2 doesn't need typescript-runtime. There is a warning for that on https://typescript.nuxtjs.org/guide/introduction

How can this error be resolved?

Don't install and use @nuxt/typescript-runtime in your project.