新建工程 Uncaught TypeError: Failed to resolve module specifier "vue". Relative references must start with either "/", "./", or "../".
时间: 2023-11-05 08:51:49 浏览: 390
引用[1]:Not using node.js : Uncaught TypeError: Failed to resolve module specifier "three". Relative references must start with either "/", "./", or "../" - 卑面派对 - 博客园
引用[2]:错误信息 Uncaught TypeError: Failed to resolve module specifier “three”. Relative references must start with either “/”, “./”, or “…/”.
引用[3]:html <head> <script type="importmap"> { "imports": { "three": "https://unpkg.com/three@0.138.0/build/three.module.js", "OrbitControls": "https://unpkg.com/three@0.138.0/examples/jsm/controls/OrbitControls.js" } } </script> </head> <body> <script type="module" src="js/test.js"></script> </body> // test.js import * as THREE from 'three'; import { OrbitControls } from 'OrbitControls'; scene = new THREE.Scene(); renderer = new THREE.WebGLRenderer(); controls = new OrbitControls(camera, renderer.domElement);。
问题:新建工程 Uncaught TypeError: Failed to resolve module specifier "vue". Relative references must start with either "/", "./", or "../".
回答: 根据你提供的引用内容,错误信息"Uncaught TypeError: Failed to resolve module specifier "vue". Relative references must start with either "/", "./", or "../"通常是由于模块的路径引用错误导致的。在你的新建工程中,你可能没有正确引入Vue模块。请确保你已经正确安装了Vue,并在你的代码中使用正确的路径引用Vue模块。你可以尝试使用相对路径或绝对路径来引用Vue模块,例如"./vue"或"/vue"。如果问题仍然存在,请检查你的引用路径是否正确,并确保你的Vue模块已经正确安装。
阅读全文