Skip to content

Can't get it working on Nuxt2 #135

@tepafril

Description

@tepafril

Hey there! It's a great plugin. Though, I can't install it successfully on my NuxtJS.

` ERROR Failed to compile with 2 errors

ERROR in ./node_modules/pinia-orm/dist/index.mjs

Module parse failed: Unexpected token (341:18)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| var Uid = class extends Type {
| make(value) {

return value ?? nanoid();

| }
| };

@ ./models/models/restaurant.model.ts 29:0-34 53:2-7
@ ./models/index.ts
@ ./services/restaurant/restaurant.service.ts
@ ./services/index.ts
@ ./store/restaurant.store.ts
@ ./.nuxt/store.js
@ ./.nuxt/index.js
@ ./.nuxt/client.js
@ multi ./node_modules/eventsource-polyfill/dist/browserify-eventsource.js (webpack)-hot-middleware/client.js?reload=true&timeout=30000&ansiColors=&overlayStyles=&path=%2Fbutler%2F__webpack_hmr%2Fclient&name=client ./.nuxt/client.js

ERROR in ./node_modules/pinia-orm/dist/index.js

Module parse failed: Unexpected token (414:18)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| var Uid = class extends Type {
| make(value) {

return value ?? (0, import_non_secure.nanoid)();

| }
| };

@ ./node_modules/@pinia-orm/nuxt/dist/runtime/nuxt2-plugin.mjs 1:0-33 3:17-25
@ ./.nuxt/index.js
@ ./.nuxt/client.js
@ multi ./node_modules/eventsource-polyfill/dist/browserify-eventsource.js (webpack)-hot-middleware/client.js?reload=true&timeout=30000&ansiColors=&overlayStyles=&path=%2Fbutler%2F__webpack_hmr%2Fclient&name=client ./.nuxt/client.js`

And here is my package.json

{
"name": "ebutler-web",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate",
"lint:prettier": "prettier --check .",
"lint": "npm run lint:prettier",
"lintfix": "prettier --write --list-different ."
},
"dependencies": {
"@nuxtjs/auth-next": "5.0.0-1648802546.c9880dc",
"@nuxtjs/axios": "^5.13.6",
"@nuxtjs/composition-api": "^0.33.0",
"@nuxtjs/pwa": "^3.3.5",
"@pinia-orm/nuxt": "^1.0.17",
"@pinia/nuxt": "^0.2.1",
"class-transformer": "^0.5.1",
"core-js": "^3.19.3",
"nuxt": "^2.15.8",
"pinia": "^2.0.16",
"pinia-orm": "^1.0.0-rc.4",
"reflect-metadata": "^0.1.13",
"ts-mixer": "^6.0.1",
"vue": "^2.6.14",
"vue-server-renderer": "^2.6.14",
"vue-template-compiler": "^2.6.14",
"vuetify": "^2.6.1",
"webpack": "^4.46.0"
},
"devDependencies": {
"@fortawesome/fontawesome-free": "^6.1.1",
"@nuxt/types": "^2.15.8",
"@nuxt/typescript-build": "^2.1.0",
"@nuxtjs/vuetify": "^1.12.3",
"eslint-config-prettier": "^8.3.0",
"prettier": "^2.5.1"
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghas workaroundThe issue contains a temporary solution to get around the problemwontfixThis will not be worked on

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions