nuxt / example-auth0

A simple example that shows how to use Nuxt.js with Auth0.
https://auth0.nuxtjs.org
MIT License
718 stars 159 forks source link

These dependencies were not found: #23

Closed haoxl3 closed 4 years ago

haoxl3 commented 6 years ago

To install them, you can run: npm install --save ~/config.json ~components/ForkThis ~components/Navbar ~components/SuperSecretDiv

When I execute the command“npm install”"npm run dev",What happened?

This question is available on Nuxt.js community (#c6)
longdong-tai commented 6 years ago

you 把 ~components 改成 ../components 试试

cybibo commented 6 years ago

I like this:

npm install --save ~/config.json ~components/rkThis ~components/Navbar ~components/SuperSecretDiv npm ERR! code ENOLOCAL npm ERR! Could not install from "../../../config.json" as it does not contain a package.json file.

andreevsm commented 6 years ago

I have the same error. Please, fix this!

DougHayward commented 6 years ago

Also getting similar errors. As below:


These dependencies were not found:

* ~/config.json in ./utils/lock.js
* ~components/ForkThis in ./node_modules/babel-loader/lib?{"babelrc":false,"cacheDirectory":true,"presets":[["/var/www/html/example-auth0/node_modules/babel-preset-vue-app/dist/index.common.js",{"targets":{"ie":9,"uglify":true}}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./layouts/default.vue
* ~components/Navbar in ./node_modules/babel-loader/lib?{"babelrc":false,"cacheDirectory":true,"presets":[["/var/www/html/example-auth0/node_modules/babel-preset-vue-app/dist/index.common.js",{"targets":{"ie":9,"uglify":true}}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./layouts/default.vue
* ~components/SuperSecretDiv in ./node_modules/babel-loader/lib?{"babelrc":false,"cacheDirectory":true,"presets":[["/var/www/html/example-auth0/node_modules/babel-preset-vue-app/dist/index.common.js",{"targets":{"ie":9,"uglify":true}}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./pages/index.vue

To install them, you can run: npm install --save ~/config.json ~components/ForkThis ~components/Navbar ~components/SuperSecretDiv

Running the command as specified (To install them, you can run: npm install --save ~/config.json ~components/ForkThis ~components/Navbar ~components/SuperSecretDiv) simply results in another error:

npm ERR! code ENOLOCAL
npm ERR! Could not install from "../../../../config.json" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:
npm ERR!     /.npm/_logs/2018-01-10T12_24_22_503Z-debug.log
dzirtfox commented 6 years ago

Same error

To install them, you can run: npm install --save ~/config.json ~components/ForkThis ~components/Navbar ~components/SuperSecretDiv

claytonpiccinin commented 6 years ago

Same error here, any updates?

warpedpuppy commented 6 years ago

I solved this by adding a forward slash on those three dependencies.

So index.vue, line 21 went from: import SuperSecretDiv from ~components/SuperSecretDiv to: import SuperSecretDiv from ~/components/SuperSecretDiv

And default.vue lines 12 & 13, from: import Navbar from ~components/Navbar import ForkThis from ~components/ForkThis to: import Navbar from ~/components/Navbar import ForkThis from ~/components/ForkThis

dbcbos commented 6 years ago

Warpedpuppy has it right.

Adding forward slashes helps. You will need to also edit the store/index.js and replace the above three lines with this:

export const state = () => ({
  user: null
})

As was said in https://github.com/nuxt/example-auth0/issues/19

Probably has to do with nuxt development improving and this was an old example. Needs a tiny update this git to get it to work