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

npm run dev erors

Open Alexandr-Lazariev opened this issue 6 years ago • 3 comments

Hey guys,

I've got this error after I run "npm run dev" I copied config files but I didn't generate new values , but I think it's not the case here, right?

fs.js:133
  throw new ERR_INVALID_CALLBACK();
  ^

TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
    at maybeCallback (fs.js:133:9)
    at Object.writeFile (fs.js:1139:14)
    at err (/Users/lazarieo/git-private/sample-media-pwa/build/transpile-sass.js:54:10)
    at /Users/lazarieo/git-private/sample-media-pwa/node_modules/mkdirp/index.js:48:26
    at FSReqWrap.oncomplete (fs.js:159:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build-sass: `node build/transpile-sass.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build-sass 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/lazarieo/.npm/_logs/2018-07-20T11_15_37_581Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `npm run clean-dist && npm run make-dist && npm run make-client && npm run copy-all && npm run build-js && npm run build-sass && npm run build-resource-list`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build 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/lazarieo/.npm/_logs/2018-07-20T11_15_37_613Z-debug.log
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/lazarieo/.npm/_logs/2018-07-20T11_15_37_642Z-debug.log

npm version 6.1.0 node version 10.5.0

Alexandr-Lazariev avatar Jul 20 '18 11:07 Alexandr-Lazariev

I also get error `> [email protected] copy-client C:\Users\User\Desktop\sample-media-pwa

copy "src/client//." "!src/client/scripts//." "!src/client/styles//." "!src/client/videos//." dist/client

The syntax of the command is incorrect. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] copy-client: copy "src/client/**/*.*" "!src/client/scripts/**/*.*" "!src/client/styles/**/*.*" "!src/client/videos/**/*.*" dist/client npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] copy-client 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! C:\Users\User\AppData\Roaming\npm-cache_logs\2018-09-13T03_34_36_502Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] copy-all: npm run copy-server && npm run copy-config && npm run copy-views && npm run copy-client npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] copy-all 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! C:\Users\User\AppData\Roaming\npm-cache_logs\2018-09-13T03_34_37_021Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] build: npm run clean-dist && npm run make-dist && npm run make-client && npm run copy-all && npm run build-js && npm run build-sass && npm run build-resource-list npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] build 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! C:\Users\User\AppData\Roaming\npm-cache_logs\2018-09-13T03_34_37_149Z-debug.log 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! C:\Users\User\AppData\Roaming\npm-cache_logs\2018-09-13T03_34_37_228Z-debug.log`

ghost avatar Sep 13 '18 02:09 ghost

In my case removing node_modules and ~/.node-gyp folders and running npm install and npm update after, solved the problem

Alexandr-Lazariev avatar Sep 13 '18 09:09 Alexandr-Lazariev

I also get error `> [email protected] copy-client C:\Users\User\Desktop\sample-media-pwa

copy "src/client//." "!src/client/scripts//." "!src/client/styles//." "!src/client/videos//." dist/client

...

I had the same problem, the command copy is from a npm library /jonschlinkert/copy.

I've installed the library globally, also since it didn't find the command I've replaced the command in the package.json with the full path of the binary

npm install --global copy
// package.json
"scripts": {
    ...
    "copy-client": "C:/nvm/v8.11.1/copy \"src/client/**/*.*\" \"!src/client/scripts/**/*.*\" \"!src/client/styles/**/*.*\" \"!src/client/videos/**/*.*\" \"dist/client\"",

This worked for me

scailbc avatar Dec 20 '19 15:12 scailbc