sample-media-pwa icon indicating copy to clipboard operation
sample-media-pwa copied to clipboard

npm run dev doesn't work well

Open fr-irene opened this issue 8 years ago • 5 comments

Hi, I wanted to try running this project on my local computer, I did the npm install and added the config files, But when I run the npm run dev, these error occured.

> [email protected] build-resource-list /Users/01138260/Documents/GitHub/sample-media-pwa
> node build/build-resource-list.js

(node:9780) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
child_process.js:400
    throw new TypeError('"cwd" must be a string');
    ^

TypeError: "cwd" must be a string
    at normalizeSpawnArguments (child_process.js:400:11)
    at exports.spawn (child_process.js:493:38)
    at /Users/01138260/Documents/GitHub/sample-media-pwa/node_modules/parallelshell/index.js:104:17
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (/Users/01138260/Documents/GitHub/sample-media-pwa/node_modules/parallelshell/index.js:100:6)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: `npm run build && parallelshell "npm run watch" "npm run serve"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] dev 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!     /Users/01138260/.npm/_logs/2018-01-24T04_43_37_764Z-debug.log

Do you know why is it and how to fix this?

fr-irene avatar Jan 24 '18 04:01 fr-irene

I also face same issue

Malaratgithub avatar Feb 07 '18 05:02 Malaratgithub

Using node 7 instead of node 8 & 9 will solve the issue.

badersur avatar Feb 07 '18 18:02 badersur

Hi guys. Just replacing parallelshell worked for me in node v8.11.1 Please follow the pull request [ https://github.com/GoogleChromeLabs/sample-media-pwa/pull/38 ] to fix this. Or clone my fork of this repo [ https://github.com/ayudhDas/sample-media-pwa ]

A big shout out to @paullewis for the developer diaries for this repo.

ayudhDas avatar Apr 19 '18 11:04 ayudhDas

@ayudhDas I tried your fix but now I'm getting something else. This did happen to you as well?





(node:3488) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
sh: concurrently: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] dev: `npm run build && concurrently "npm run watch" "npm run serve"`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.




JoseVivanco2 avatar May 19 '18 00:05 JoseVivanco2

@JoseVivanco2 Did you install all npm dependencies [run: npm install] before running the command? If yes can you tell me the exact steps you followed?

ayudhDas avatar May 20 '18 17:05 ayudhDas