Look at the Nuxt 3 documentation to learn more.
Make sure to install datagouv-components and cdata dependencies:
# npm
cd ./datagouv-components
npm install
cd ..
npm install
Start the development server on http://localhost:3000
:
# npm
npm run dev
You can work on cdata
without a local udata
backend by pointing to https://demo.data.gouv.fr directly. To do this, create a .env
file at the root of the project:
NUXT_PUBLIC_API_BASE=https://demo.data.gouv.fr # Or your dedicated development platform
NUXT_PUBLIC_DEV_API_KEY=your_api_key_from_dev
If you encounter ENOSPC
errors, you may want to increase the system limit of file watchers :
# linux
sudo sysctl fs.inotify.max_user_watches=131070
# macos
sudo sysctl -w kern.maxfiles=131070
sudo sysctl -w kern.maxfilesperproc=131070
If you encounter EBADF
errors, you are probably affected by this chokidar issue.
You can try to :
- disable devtools
- add
overrides
to the package.json and lock"chokidar": "^3.6.0"
Build the application for production:
# npm
npm run build
Locally preview production build:
# npm
npm run preview
Check out the deployment documentation for more information.