VUE 3 - где именно ошибка в файле?
От: Glestwid  
Дата: 16.01.23 17:29
Оценка:
Запустил npm run build, получил хрень:

"C:\Program Files\nodejs\npm.cmd" run build

> weather-ui@0.1.0 build
> vue-cli-service build

All browser targets in the browserslist configuration have supported ES module.
Therefore we don't build two separate bundles for differential loading.


— Building for production...

ERROR Failed to compile with 1 error 8:20:18 PM

error in ./src/components/WeatherSearch.vue?vue&type=script&lang=js

Module not found: Error: Can't resolve 'Spin.vue' in 'C:\prj\DEMO\APPS\web\weather-ui\src\components'
Did you mean './Spin.vue'?
Requests that should resolve in the current directory need to start with './'.
Requests that start with a name are treated as module requests and resolve within module directories (node_modules, C:\prj\DEMO\APPS\web\weather-ui\node_modules, C:\prj\DEMO\APPS\web\weather-ui\node_modules\@vue\cli
-service\node_modules).
If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too.

ERROR Error: Build failed with errors.
Error: Build failed with errors.
at C:\prj\DEMO\APPS\web\weather-ui\node_modules\@vue\cli-service\lib\commands\build\index.js:207:23
at C:\prj\DEMO\APPS\web\weather-ui\node_modules\webpack\lib\webpack.js:148:8
at C:\prj\DEMO\APPS\web\weather-ui\node_modules\webpack\lib\HookWebpackError.js:68:3
at Hook.eval [as callAsync] (eval at create (C:\prj\DEMO\APPS\web\weather-ui\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (C:\prj\DEMO\APPS\web\weather-ui\node_modules\tapable\lib\Hook.js:18:14)
at Cache.shutdown (C:\prj\DEMO\APPS\web\weather-ui\node_modules\webpack\lib\Cache.js:150:23)
at C:\prj\DEMO\APPS\web\weather-ui\node_modules\webpack\lib\Compiler.js:1225:15
at Hook.eval [as callAsync] (eval at create (C:\prj\DEMO\APPS\web\weather-ui\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (C:\prj\DEMO\APPS\web\weather-ui\node_modules\tapable\lib\Hook.js:18:14)
at Compiler.close (C:\prj\DEMO\APPS\web\weather-ui\node_modules\webpack\lib\Compiler.js:1218:23)
at C:\prj\DEMO\APPS\web\weather-ui\node_modules\webpack\lib\webpack.js:147:16
at finalCallback (C:\prj\DEMO\APPS\web\weather-ui\node_modules\webpack\lib\Compiler.js:441:32)
at C:\prj\DEMO\APPS\web\weather-ui\node_modules\webpack\lib\Compiler.js:458:13
at Hook.eval [as callAsync] (eval at create (C:\prj\DEMO\APPS\web\weather-ui\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:24:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (C:\prj\DEMO\APPS\web\weather-ui\node_modules\tapable\lib\Hook.js:18:14)
at onCompiled (C:\prj\DEMO\APPS\web\weather-ui\node_modules\webpack\lib\Compiler.js:456:21)
at C:\prj\DEMO\APPS\web\weather-ui\node_modules\webpack\lib\Compiler.js:1196:17
at Hook.eval [as callAsync] (eval at create (C:\prj\DEMO\APPS\web\weather-ui\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (C:\prj\DEMO\APPS\web\weather-ui\node_modules\tapable\lib\Hook.js:18:14)
at C:\prj\DEMO\APPS\web\weather-ui\node_modules\webpack\lib\Compiler.js:1192:33
at finalCallback (C:\prj\DEMO\APPS\web\weather-ui\node_modules\webpack\lib\Compilation.js:2787:11)
at C:\prj\DEMO\APPS\web\weather-ui\node_modules\webpack\lib\Compilation.js:3092:11
at Hook.eval [as callAsync] (eval at create (C:\prj\DEMO\APPS\web\weather-ui\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (C:\prj\DEMO\APPS\web\weather-ui\node_modules\tapable\lib\Hook.js:18:14)
at C:\prj\DEMO\APPS\web\weather-ui\node_modules\webpack\lib\Compilation.js:3085:38
at eval (eval at create (C:\prj\DEMO\APPS\web\weather-ui\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:17:1)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)


Как из этого бреда понять какая строка в WeatherSearch.vue ему не понравилась?
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.