前提・実現したいこと
Docker環境にてLaravelを用いてWebサイトを作成中です。
Docker環境にて、LaradockにてSassを使えるようにしたいのですが、エラーが発生しました。
解決策をご教授願います。
発生している問題・エラーメッセージ
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ development: node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-05-10T07_41_47_416Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ watch: npm run development -- --watch
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ watch script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-05-10T07_41_47_468Z-debug.log
下記は、/root/.npm/_logs/2020-05-10T07_41_47_468Z-debug.logのログ内容になります。
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/home/laradock/.nvm/versions/node/v14.0.0/bin/node',
1 verbose cli '/home/laradock/.nvm/versions/node/v14.0.0/bin/npm',
1 verbose cli 'run',
1 verbose cli 'watch'
1 verbose cli ]
2 info using npm@6.14.4
3 info using node@v14.0.0
4 verbose run-script [ 'prewatch', 'watch', 'postwatch' ]
5 info lifecycle @~prewatch: @
6 info lifecycle @~watch: @
7 verbose lifecycle @~watch: unsafe-perm in lifecycle true
8 verbose lifecycle @~watch: PATH: /home/laradock/.nvm/versions/node/v14.0.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/var/www/Myproject/node_modules/.bin:/home/laradock/.yarn/bin:/home/laradock/.nvm/versions/node/v14.0.0/bin:/root/.composer/vendor/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/var/www/vendor/bin
9 verbose lifecycle @~watch: CWD: /var/www/Myproject
10 silly lifecycle @~watch: Args: [ '-c', 'npm run development -- --watch' ]
11 silly lifecycle @~watch: Returned: code: 1 signal: null
12 info lifecycle @~watch: Failed to exec watch script
13 verbose stack Error: @ watch: npm run development -- --watch
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/home/laradock/.nvm/versions/node/v14.0.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
13 verbose stack at ChildProcess.<anonymous> (/home/laradock/.nvm/versions/node/v14.0.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1051:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid @
15 verbose cwd /var/www/Myproject
16 verbose Linux 4.14.154-boot2docker
17 verbose argv "/home/laradock/.nvm/versions/node/v14.0.0/bin/node" "/home/laradock/.nvm/versions/node/v14.0.0/bin/npm" "run" "watch"
18 verbose node v14.0.0
19 verbose npm v6.14.4
20 error code ELIFECYCLE
21 error errno 1
22 error @ watch: npm run development -- --watch
22 error Exit status 1
23 error Failed at the @ watch script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
該当のソースコード
npm run watch
試したこと
下記記事の対応策は試しましたが、エラーは消えませんでした。
https://takaolab.com/laradock-sass-config/
https://takaolab.com/resolution-cross-env-not-found/
https://qiita.com/wafuwafu13/items/2fe43414aa6e1899f494
補足情報(FW/ツールのバージョンなど)
【OS】windows10home
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/05/12 14:19
2020/05/12 15:06
2020/05/15 13:54
2020/05/15 15:44