我想在Nuxt项目中使用'npm运行生成‘,但是我有错误:
Path C:/Users/Марина/OneDrive/Desktop/weHost/zabota-dialog/nuxt.config.js is not in cwd C:\Users\Марина\OneDrive\Desktop\weHost\zabota-dialog Nuxt.config.js现在位于Project根目录中。文件内容:
export default {
// Target: https://go.nuxtjs.dev/config-target
target: "static",
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
title: "dialog-zabota",
htmlAttrs: {
lang: "en"
},
meta: [
{ charset: "utf-8" },
{ name: "viewport", content: "width=device-width, initial-scale=1" },
{ hid: "description", name: "description", content: "" }
],
link: [{ rel: "icon", type: "image/x-icon", href: "/favicon.ico" }]
},
// Global CSS: https://go.nuxtjs.dev/config-css
css: ["./assets/less/main.less"],
styleResources: {
less: ["./assets/less/static/variables.less", "./assets/less/static/font-face.less"]
},
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: [],
// Auto import components: https://go.nuxtjs.dev/config-components
components: true,
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
buildModules: ["@nuxtjs/style-resources"],
// Modules: https://go.nuxtjs.dev/config-modules
modules: [],
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {}
};我做错了什么?为什么不跑?
发布于 2021-04-14 17:19:30
不知道如何修复它,因为我是在一个基于UNIX的系统上,但实际上有一个不同之处
C:\Users\Марина\OneDrive\Desktop\weHost\zabota-dialogvs
C:/Users/Марина/OneDrive/Desktop/weHost/zabota-dialog/nuxt.config.js斜杠不匹配,\对/。您对系统做了一些特定的配置吗?
这个可能会有帮助:Nodejs absolute paths in windows with forward slash
或者任何带有npm backslash windows关键字的google查询。
发布于 2022-01-21 15:47:57
我可以建议以后不要在路径.Its帮助中使用西里尔
发布于 2022-11-15 22:04:31
我认为这可能是因为非ASCII字符也可能发生。我用土耳其语使用Windows,所以在我的路径上有一个"/Masaüstü/“部分,我把我的文件夹带到C:/src并修复了问题。
https://stackoverflow.com/questions/67093079
复制相似问题