Добрый день! Я далек от JS, но вот нужно поставить приложение на node.js. На этапе `npm run dev` вылазит такая проблема:
# npm run dev
> @ dev /var/www/antweb
> npm run development
> @ development /var/www/antweb
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=webpack.config.js
Copying node_modules/bootstrap-vue/dist/bootstrap-vue.css to /var/www/antweb/public/css/bootstrap-vue.css
95% emitting
ERROR Failed to compile with 3 errors 6:05:50 PM
This dependency was not found:
* vue-select in ./resources/assets/js/pages/register.js, ./resources/assets/js/pages/crud.js and 1 other
To install it, you can run: npm install --save vue-select
....
Казалось бы, все просто, но эта команда не помогает:
# npm install --save vue-select
npm WARN The package vuejs-datepicker is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ vue-select@3.1.0
updated 1 package and audited 18946 packages in 27.866s
found 75 vulnerabilities (31 low, 24 moderate, 20 high)
run `npm audit fix` to fix them, or `npm audit` for details
Вроде как он установлен. Но если снова сделать
npm run dev
имеем ту же проблему.
Каталог
node_modules/vue-select/
есть, файлы в нем есть.
На всякий случай, открыл JS файл в котором он используется, используется он так:
import vSelect from "vue-select";
Еще есть странность, может быть как-то связана. В package.json он сейчас прописан вот так странно:
....
"vue-chartkick": "^0.2.2",
"vue-disable-autocomplete": "0.0.4",
"vue-select": "github:sagalbot/vue-select",
"vue-socket.io": "^2.1.1",
....
То есть, все прописаны с версиями, а он с указанием на github без версии.
Вот лог от
npm run dev
:
log0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'development' ]
2 info using npm@6.9.0
3 info using node@v12.4.0
4 verbose run-script [ 'predevelopment', 'development', 'postdevelopment' ]
5 info lifecycle @~predevelopment: @
6 info lifecycle @~development: @
7 verbose lifecycle @~development: unsafe-perm in lifecycle true
8 verbose lifecycle @~development: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/var/www/antweb/node_modules/.bin:/usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/var/www/antweb/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
9 verbose lifecycle @~development: CWD: /var/www/antweb
10 silly lifecycle @~development: Args: [
10 silly lifecycle '-c',
10 silly lifecycle 'cross-env NODE_ENV=development ' +
10 silly lifecycle 'node_modules/webpack/bin/webpack.js --progress ' +
10 silly lifecycle '--hide-modules --config=webpack.config.js'
10 silly lifecycle ]
11 silly lifecycle @~development: Returned: code: 2 signal: null
12 info lifecycle @~development: Failed to exec development script
13 verbose stack Error: @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=webpack.config.js`
13 verbose stack Exit status 2
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:200:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:200:13)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid @
15 verbose cwd /var/www/antweb
16 verbose Linux 4.9.0-6-amd64
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "development"
18 verbose node v12.4.0
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 2
22 error @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=webpack.config.js`
22 error Exit status 2
23 error Failed at the @ development script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]
Есть идеи, почему он установлен, но
npm run dev
его не видит?