ahmadawais / WPGulp

An advanced Gulp workflow for WordPress development with extensive documentation. Used by 40,000+ themes and plugins.
https://twitter.com/MrAhmadAwais/
MIT License
1.77k stars 303 forks source link

Errors on intall and start #183

Closed jmccall75 closed 4 years ago

jmccall75 commented 4 years ago

I am getting the following errors when running npx wpgulp

1. Creating WPGulp files inside →  D:\Dropbox\xampp\htdocs\mockups\apbf-mockups
| 2. Installing npm packages...C:\Users\joshm\AppData\Roaming\npm-cache\_npx\26136\node_modules\wpgulp\installer\index.js:34
        throw err;
        ^

Error: Command failed: npm install
npm WARN deprecated gulp-util@2.2.20: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm ERR! path D:\Dropbox\xampp\htdocs\mockups\apbf-mockups\node_modules\@babel\plugin-syntax-json-strings
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'D:\Dropbox\xampp\htdocs\mockups\apbf-mockups\node_modules\@babel\plugin-syntax-json-strings' -> 'D:\Dropbox\xampp\htdocs\mockups\apbf-mockups\node_modules\@babel\.plugin-syntax-json-strings.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\xxx\AppData\Roaming\npm-cache\_logs\2020-03-04T15_58_08_951Z-debug.log

    at makeError (C:\Users\joshm\AppData\Roaming\npm-cache\_npx\26136\node_modules\wpgulp\node_modules\execa\index.js:174:9)
    at Promise.all.then.arr (C:\Users\joshm\AppData\Roaming\npm-cache\_npx\26136\node_modules\wpgulp\node_modules\execa\index.js:278:16)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:182:7)

And then if I run npm start, I get these errors:

 [11:00:15] Failed to load external module @babel/register
[11:00:15] Failed to load external module babel-register
[11:00:15] Failed to load external module babel-core/register
[11:00:15] Failed to load external module babel/register
[11:00:15] Local gulp not found in D:\Dropbox\xampp\htdocs\mockups\apbf-mockups
[11:00:15] Try running: npm install gulp
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! your-project@1.0.0 start: `gulp`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the your-project@1.0.0 start 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\joshm\AppData\Roaming\npm-cache\_logs\2020-03-04T16_00_15_596Z-debug.log

I'm a little inexperienced with npm and etc., so it's possible this is a problem on my end.

  1. node -v: v9.11.1
  2. npm -v: 6.7.0
  3. yarn --version (if you use Yarn):

Then, specify:

  1. Operating system: Windows 10
  2. Browser and version (if relevant):

Possible Solution

I have been able to force the install to complete by running npm install AFTER running npx wpgulp. But this solution only seems to work intermittently.

ahmadawais commented 4 years ago

You should probably update your node version. You are using one that has no support at all. You should be using min v12. https://nodejs.org/en/download/

jmccall75 commented 4 years ago

You're right. I upgraded node and npm to the latest and the errors seem to have gone away. Thought there was a good chance the problem was me. :)

ahmadawais commented 4 years ago

Glad it helped :)