I want to use 'npm run generate' in Nuxt project, but i have error:
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 now in Project root directory. File contents:
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: {}
};
What i do wrong? Why it's not run?
Not sure how to fix it since I'm on an UNIX-based system but there is actually a difference
C:\Users\Марина\OneDrive\Desktop\weHost\zabota-dialog
vs
C:/Users/Марина/OneDrive/Desktop/weHost/zabota-dialog/nuxt.config.js
The slashes do not match, \
vs /
. Did you do some specific configuration with your system?
This one may help: Nodejs absolute paths in windows with forward slash
Or any google query with npm backslash windows
keywords.