Comments (10)
@Atinux I propose considering making ./src the default folder, to bring it to parity with how vue-cli generates projects - makes for a more consistent experience imo. just a thought!
from nuxt.js.
I'm working on it to merge it pretty soon :)
from nuxt.js.
@danieloprado once the pull request is excepted you'll be able to do that. #44
from nuxt.js.
Ok, so looking through the code there is a rootDIr
option. After setting that to ./src
, I get the following error:
ā nuxt
nuxt:build App root: src +0ms
nuxt:build Generating .nuxt/ files... +2ms
nuxt:build Generating routes... +6ms
nuxt:build Generating files... +7ms
nuxt:build Adding webpack middlewares... +13ms
Ready on http://localhost:3000
webpack built 6040be73cf7bdbc8b0ad in 123ms
Hash: 6040be73cf7bdbc8b0ad
Version: webpack 2.1.0-beta.27
Time: 123ms
Asset Size Chunks Chunk Names
nuxt.bundle.js 399 bytes 0 app
vendor.bundle.js 30.7 kB 1 vendor
nuxt.bundle.js.map 91 bytes 0 app
vendor.bundle.js.map 32.2 kB 1 vendor
ERROR in multi vendor
Module not found: Error: Can't resolve 'vue' in '/Users/cj/Sync/apps/acd/nuxt'
@ multi vendor
ERROR in multi vendor
Module not found: Error: Can't resolve 'vue-router' in '/Users/cj/Sync/apps/acd/nuxt'
@ multi vendor
ERROR in multi vendor
Module not found: Error: Can't resolve 'vue-meta' in '/Users/cj/Sync/apps/acd/nuxt'
@ multi vendor
ERROR in multi vendor
Module not found: Error: Can't resolve 'es6-promise' in '/Users/cj/Sync/apps/acd/nuxt'
@ multi vendor
ERROR in multi vendor
Module not found: Error: Can't resolve 'es6-object-assign' in '/Users/cj/Sync/apps/acd/nuxt'
@ multi vendor
ERROR in multi app
Module not found: Error: Can't resolve 'babel-loader' in '/Users/cj/Sync/apps/acd/nuxt'
@ multi app
ERROR in multi app
Module not found: Error: Can't resolve 'webpack-hot-middleware/client?reload=true' in '/Users/cj/Sync/apps/acd/nuxt'
@ multi app
Entry module not found: Error: Can't resolve 'babel-loader' in '/Users/cj/Sync/apps/acd/nuxt'
resolve 'babel-loader' in '/Users/cj/Sync/apps/acd/nuxt'
Parsed request is a module
using description file: /Users/cj/Sync/apps/acd/nuxt/package.json (relative path: .)
after using description file: /Users/cj/Sync/apps/acd/nuxt/package.json (relative path: .)
resolve as module
/Users/cj/Sync/apps/acd/nuxt/src/node_modules doesn't exist or is not a directory
/Users/cj/Sync/apps/src/node_modules doesn't exist or is not a directory
/Users/cj/Sync/apps/acd/src/node_modules doesn't exist or is not a directory
/Users/cj/Sync/src/node_modules doesn't exist or is not a directory
/Users/cj/src/node_modules doesn't exist or is not a directory
/Users/src/node_modules doesn't exist or is not a directory
/src/node_modules doesn't exist or is not a directory
looking for modules in /Users/cj/Sync/apps/acd/nuxt/node_modules/nuxt/node_modules
using description file: /Users/cj/Sync/apps/acd/nuxt/node_modules/nuxt/package.json (relative path: ./node_modules)
after using description file: /Users/cj/Sync/apps/acd/nuxt/node_modules/nuxt/package.json (relative path: ./node_modules)
using description file: /Users/cj/Sync/apps/acd/nuxt/node_modules/nuxt/package.json (relative path: ./node_modules/babel-loader)
as directory
/Users/cj/Sync/apps/acd/nuxt/node_modules/nuxt/node_modules/babel-loader doesn't exist
no extension
/Users/cj/Sync/apps/acd/nuxt/node_modules/nuxt/node_modules/babel-loader doesn't exist
.js
/Users/cj/Sync/apps/acd/nuxt/node_modules/nuxt/node_modules/babel-loader.js doesn't exist
.json
/Users/cj/Sync/apps/acd/nuxt/node_modules/nuxt/node_modules/babel-loader.json doesn't exist
/Users/cj/Sync/apps/acd/nuxt/node_modules/memory-fs/lib/MemoryFileSystem.js:114
throw new MemoryFileSystemError(errors.code.ENOENT, _path);
^
Error: no such file or directory
at MemoryFileSystem.readFileSync (/Users/cj/Sync/apps/acd/nuxt/node_modules/memory-fs/lib/MemoryFileSystem.js:114:10)
at Watching.webpackServerWatcher.serverCompiler.watch [as handler] (/Users/cj/Sync/apps/acd/nuxt/node_modules/nuxt/lib/build/index.js:268:35)
at Watching._done (/Users/cj/Sync/apps/acd/nuxt/node_modules/webpack/lib/Compiler.js:96:7)
at /Users/cj/Sync/apps/acd/nuxt/node_modules/webpack/lib/Compiler.js:76:18
at Compiler.emitRecords (/Users/cj/Sync/apps/acd/nuxt/node_modules/webpack/lib/Compiler.js:350:37)
at /Users/cj/Sync/apps/acd/nuxt/node_modules/webpack/lib/Compiler.js:59:19
at /Users/cj/Sync/apps/acd/nuxt/node_modules/webpack/lib/Compiler.js:343:11
at Compiler.applyPluginsAsyncSeries (/Users/cj/Sync/apps/acd/nuxt/node_modules/tapable/lib/Tapable.js:95:46)
at Compiler.afterEmit (/Users/cj/Sync/apps/acd/nuxt/node_modules/webpack/lib/Compiler.js:340:8)
at Compiler.<anonymous> (/Users/cj/Sync/apps/acd/nuxt/node_modules/webpack/lib/Compiler.js:335:14)
from nuxt.js.
I'm trying to end up with this structure:
from nuxt.js.
looks like there needs to be a srcDir
option. going to fork and add one.
from nuxt.js.
Hi @cj, why do you want to have this structure?
You need to have the node_modules/ and the nuxt.config.js in the src/ folder to make it work.
from nuxt.js.
IĀ“m looking for same option, I would like to move all file to a app folder to separate my server/api files, a rootDir option would be great!
app
|--components
|--pages
|--static
server
|--main.js
|--etc..
from nuxt.js.
You can now use the v0.8.4 š
from nuxt.js.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from nuxt.js.
Related Issues (20)
- Nuxt 3 - Convert `404.html` file to `404.shtml` on `Cpanel` hosting HOT 1
- nuxt generate is imported by "virtual:#internal/nitro/virtual/storage", but could not be resolved ā treating it as an external dependency.
- https://nuxt.com isn't working on firefox HOT 2
- "No match found for location with path" is still spammed on unknown paths HOT 1
- Uncaught SyntaxError when building Nuxt.js 3.11.2 with Webpack HOT 1
- Docs: Nuxt Layers video update with latest one
- Docs: Nuxt Layers video update with latest one
- node .output/server/index.mjs error HOT 2
- Cannot find module from node_modules
- Move `@nuxt/ui-templates` into nuxt/nuxt monorepo
- Refreshed NuxtWelcome design (+ other error pages?)
- Resolve `runtimeConfig` within nuxt options
- public subfolder name collision with route causes 301 redirect HOT 1
- Unable to access logger in client or server from plugin HOT 1
- Error with `dist` symlink with SST Ion
- Navigating from router-view throws Missing required param
- Failed CSS preloads shouldn't throw errors
- Big bundle size due to jsdom canvas HOT 1
- 锵é¢å·ę° 锵é¢ęåØ
- ERROR (node:52837) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuxt.js.