Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Local gulp not found in D:\home\site\wwwroot #2100

Closed
sudosean opened this issue Aug 12, 2016 · 8 comments
Closed

Local gulp not found in D:\home\site\wwwroot #2100

sudosean opened this issue Aug 12, 2016 · 8 comments

Comments

@sudosean
Copy link

After running npm install in the kudu powershell env multiple times, gulp never shows in my node modules. commands I've run:

npm install
npm install --force
npm install gulp -g
npm instal gulp
npm link gulp

Also, running npm install always seems to end in errors:

npm ERR! Windows_NT 6.2.9200
npm ERR! argv "D:\\Program Files (x86)\\nodejs\\4.2.3\\node.exe" "D:\\Program Files (x86)\\npm\\3.5.1\\node_modules\\npm\\bin\\npm-cli.js" "install" "--force"
npm ERR! node v4.2.3
npm ERR! npm  v3.5.1
npm ERR! path D:\home\site\wwwroot\node_modules\.staging\wrappy-e5193d35318260dc6219dca3e7bd3562
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename

npm ERR! enoent ENOENT: no such file or directory, rename 'D:\home\site\wwwroot\node_modules\.staging\wrappy-e5193d35318260dc6219dca3e7bd3562' -> 'D:\home\site\wwwroot\node_modules\bower\node_modules\update-notifier\node_modules\latest-version\node_modules\package-json\node_modules\got\node_modules\duplexify\node_modules\end-of-stream\node_modules\once\node_modules\wrappy'
npm ERR! enoent ENOENT: no such file or directory, rename 'D:\home\site\wwwroot\node_modules\.staging\wrappy-e5193d35318260dc6219dca3e7bd3562' -> 'D:\home\site\wwwroot\node_modules\bower\node_modules\update-notifier\node_modules\latest-version\node_modules\package-json\node_modules\got\node_modules\duplexify\node_modules\end-of-stream\node_modules\once\node_modules\wrappy'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! Please include the following file with any support request:
npm ERR!     D:\home\site\wwwroot\npm-debug.log



my package.json:

{
  "name": "PolicyUI",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "start": "node bin/www",
    "test": "node ./node_modules/karma/bin/karma start --single-run"
  },
  "description": "PolicyUI",
  "author": {
    "name": "577577",
    "email": "[email protected]"
  },
  "devDependencies": {
    "angular": "*",
    "angular-animate": "1.5.5",
    "angular-aria": "1.5.5",
    "angular-material": "^1.0.6",
    "angular-messages": "1.5.5",
    "angular-mocks": "^1.5.0",
    "angular-moment": "^1.0.0-beta.6",
    "angular-route": "1.5.5",
    "angular-sanitize": "1.5.5",
    "angular-smart-table": "*",
    "angular-ui-bootstrap": "*",
    "angular-ui-router": "*",
    "angular-ui-select": "*",
    "body-parser": "~1.8.1",
    "bootstrap": "github:twbs/bootstrap#v4-dev",
    "bootstrap-sass": "*",
    "bower": "1.7.1",
    "browser-sync": "^2.11.0",
    "chai": "^3.5.0",
    "cookie-parser": "~1.3.3",
    "debug": "~2.0.0",
    "del": "^2.2.0",
    "ejs": "2.3.4",
    "express": "~4.9.0",
    "font-awesome": "*",
    "gulp": "^3.8.11",
    "gulp-bower": "0.0.10",
    "gulp-concat": "^2.6.0",
    "gulp-livereload": "3.8.1",
    "gulp-notify": "^2.2.0",
    "gulp-ruby-sass": "*",
    "gulp-svgmin": "^1.2.2",
    "gulp-uglify": "^1.5.1",
    "gulp-useref": "^3.0.4",
    "gulp-watch": "*",
    "gulp-zip": "^3.2.0",
    "jquery": "*",
    "karma": "^0.13.22",
    "karma-chai": "^0.1.0",
    "karma-chrome-extra-launcher": "^0.1.0",
    "karma-chrome-launcher": "^0.2.2",
    "karma-ie-launcher": "^0.2.0",
    "karma-jspm": "^2.0.2",
    "karma-mocha": "^0.2.2",
    "karma-ng-html2js-preprocessor": "^0.2.1",
    "karma-phantomjs-launcher": "^1.0.0",
    "merge-stream": "1.0.0",
    "minimist": "^1.2.0",
    "mocha": "^2.4.5",
    "moment": "^2.13.0",
    "morgan": "~1.3.0",
    "serve-favicon": "~2.1.3",
    "slick-carousel": "^1.6.0",
    "stylus": "0.42.3"
  }
}

after inspecting the node modules, it seems several packages are missing as well. I've been handling a lot of the deployments manually. I sync azure with the gitlab repo, then I come into the kudu shell and run the npm install commands. I need gulp to generate a public/ file with the angular/express app.

Any help or recommendations here would be greatly appreciates.

@sudosean
Copy link
Author

my node version is

WEBSITE_NODE_DEFAULT_VERSION 4.2.3

@davidebbo
Copy link
Member

Can you try moving up to Node 4.4.7, which is the latest 4.x version?

@sudosean
Copy link
Author

same thing

errors when running npm install gulp

npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm ERR! Windows_NT 6.2.9200
npm ERR! argv "D:\\Program Files (x86)\\nodejs\\4.4.7\\node.exe" "D:\\Program Files (x86)\\npm\\2.15.8\\node_modules\\npm\\bin\\npm-cli.js" "install" "gulp"
npm ERR! node v4.4.7
npm ERR! npm  v2.15.8
npm ERR! path D:\home\site\wwwroot\node_modules\gulp\node_modules\gulp-util\node_modules\dateformat\node_modules\meow\node_modules\read-pkg-up\node_modules\read-pkg\node_modules\load-json-file\node_modules\parse-json\node_modules\error-ex\node_modules\is-arrayish\package.json.1546234537
npm ERR! code EINVAL
npm ERR! errno -4071
npm ERR! syscall rename

npm ERR! EINVAL: invalid argument, rename 'D:\home\site\wwwroot\node_modules\gulp\node_modules\gulp-util\node_modules\dateformat\node_modules\meow\node_modules\read-pkg-up\node_modules\read-pkg\node_modules\load-json-file\node_modules\parse-json\node_modules\error-ex\node_modules\is-arrayish\package.json.1546234537' -> 'D:\home\site\wwwroot\node_modules\gulp\node_modules\gulp-util\node_modules\dateformat\node_modules\meow\node_modules\read-pkg-up\node_modules\read-pkg\node_modules\load-json-file\node_modules\parse-json\node_modules\error-ex\node_modules\is-arrayish\package.json'
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

@sudosean
Copy link
Author

I actually can't run npm install now, below is what the powershell in kudu gives me:

Window title cannot be longer than 1023 characters.
PS D:\home\site\wwwroot> At line:1 char:1
+ npm install
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [], RuntimeException
    + FullyQualifiedErrorId : Argument

@davidebbo
Copy link
Member

Does that latest error happen consistently if you refresh Kudu Console?

But for the previous error, problem is clear: it's exceeding the 260 char path length:

D:\home\site\wwwroot\node_modules\gulp\node_modules\gulp-util\node_modules\dateformat\node_modules\meow\node_modules\read-pkg-up\node_modules\read-pkg\node_modules\load-json-file\node_modules\parse-json\node_modules\error-ex\node_modules\is-arrayish\package.json.1546234537

has 273. npm3 avoids a number of this issue, and there is a separate App Setting you can set for npm. Specifically, set WEBSITE_NPM_DEFAULT_VERSION to 3.10.3. Noe that it's a different setting form above.

@sudosean
Copy link
Author

Hi David,
I updated the NPM_DEFAULT_VERSION to 3.10.3 and restart the the site, I go into the kudu shell and run
npm install gulp -g



npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
D:\local\AppData\npm\gulp -> D:\local\AppData\npm\node_modules\gulp\bin\gulp.js
D:\local\AppData\npm
`-- [email protected] 
  +-- [email protected] 
  +-- [email protected] 
  | +-- [email protected] 
  | +-- [email protected] 
  | +-- [email protected] 
  | | `-- [email protected] 
  | +-- [email protected] 
  | `-- [email protected] 
  +-- [email protected] 
  +-- [email protected] 
  | +-- [email protected] 
  | +-- [email protected] 
  | +-- [email protected] 
  | +-- [email protected] 
  | | +-- [email protected] 
  | | `-- [email protected] 
  | |   +-- [email protected] 
  | |   | `-- [email protected] 
  | |   +-- [email protected] 
  | |   +-- [email protected] 
  | |   | +-- [email protected] 
  | |   | | `-- [email protected] 
  | |   | `-- [email protected] 
  | |   +-- [email protected] 
  | |   +-- [email protected] 
  | |   | +-- [email protected] 
  | |   | +-- [email protected] 
  | |   | | `-- [email protected] 
  | |   | `-- [email protected] 
  | |   |   +-- [email protected] 
  | |   |   | `-- [email protected] 
  | |   |   `-- [email protected] 
  | |   |     `-- [email protected] 
  | |   +-- [email protected] 
  | |   +-- [email protected] 
  | |   | +-- [email protected] 
  | |   | | +-- [email protected] 
  | |   | | `-- [email protected] 
  | |   | |   `-- [email protected] 
  | |   | `-- [email protected] 
  | |   |   +-- [email protected] 
  | |   |   | +-- [email protected] 
  | |   |   | +-- [email protected] 
  | |   |   | | `-- [email protected] 
  | |   |   | |   `-- [email protected] 
  | |   |   | +-- [email protected] 
  | |   |   | `-- [email protected] 
  | |   |   `-- [email protected] 
  | |   +-- [email protected] 
  | |   | +-- [email protected] 
  | |   | | `-- [email protected] 
  | |   | |   `-- [email protected] 
  | |   | |     `-- [email protected] 
  | |   | `-- [email protected] 
  | |   `-- [email protected] 
  | +-- [email protected] 
  | | `-- [email protected] 
  | +-- [email protected] 
  | | `-- [email protected] 
  | +-- [email protected] 
  | | `-- [email protected] 
  | +-- [email protected] 
  | +-- [email protected] 
  | +-- [email protected] 
  | +-- [email protected] 
  | | +-- [email protected] 
  | | +-- [email protected] 
  | | +-- [email protected] 
  | | +-- [email protected] 
  | | +-- [email protected] 
  | | | `-- [email protected] 
  | | +-- [email protected] 
  | | | +-- [email protected] 
  | | | +-- [email protected] 
  | | | `-- [email protected] 
  | | +-- [email protected] 
  | | `-- [email protected] 
  | +-- [email protected] 
  | | `-- [email protected] 
  | |   `-- [email protected] 
  | +-- [email protected] 
  | +-- [email protected] 
  | +-- [email protected] 
  | | +-- [email protected] 
  | | | +-- [email protected] 
  | | | +-- [email protected] 
  | | | +-- [email protected] 
  | | | +-- [email protected] 
  | | | +-- [email protected] 
  | | | `-- [email protected] 
  | | `-- [email protected] 
  | `-- [email protected] 
  |   +-- [email protected] 
  |   `-- [email protected] 
  +-- [email protected] 
  +-- [email protected] 
  | +-- [email protected] 
  | +-- [email protected] 
  | | +-- [email protected] 
  | | | `-- [email protected] 
  | | +-- [email protected] 
  | | | `-- [email protected] 
  | | +-- [email protected] 
  | | | +-- [email protected] 
  | | | | `-- [email protected] 
  | | | +-- [email protected] 
  | | | +-- [email protected] 
  | | | | +-- [email protected] 
  | | | | | `-- [email protected] 
  | | | | |   +-- [email protected] 
  | | | | |   +-- [email protected] 
  | | | | |   | `-- [email protected] 
  | | | | |   +-- [email protected] 
  | | | | |   `-- [email protected] 
  | | | | +-- [email protected] 
  | | | | `-- [email protected] 
  | | | +-- [email protected] 
  | | | | `-- [email protected] 
  | | | +-- [email protected] 
  | | | +-- [email protected] 
  | | | +-- [email protected] 
  | | | | `-- [email protected] 
  | | | +-- [email protected] 
  | | | +-- [email protected] 
  | | | | +-- [email protected] 
  | | | | | `-- [email protected] 
  | | | | `-- [email protected] 
  | | | +-- [email protected] 
  | | | | +-- [email protected] 
  | | | | | `-- [email protected] 
  | | | | `-- [email protected] 
  | | | `-- [email protected] 
  | | |   +-- [email protected] 
  | | |   `-- [email protected] 
  | | `-- [email protected] 
  | |   `-- [email protected] 
  | |     +-- [email protected] 
  | |     | +-- [email protected] 
  | |     | +-- [email protected] 
  | |     | | `-- [email protected] 
  | |     | `-- [email protected] 
  | |     |   `-- [email protected] 
  | |     `-- [email protected] 
  | +-- [email protected] 
  | | +-- [email protected] 
  | | +-- [email protected] 
  | | +-- [email protected] 
  | | +-- [email protected] 
  | | +-- [email protected] 
  | | `-- [email protected] 
  | |   +-- [email protected] 
  | |   | +-- [email protected] 
  | |   | | `-- [email protected] 
  | |   | |   `-- [email protected] 
  | |   | `-- [email protected] 
  | |   +-- [email protected] 
  | |   `-- [email protected] 
  | |     `-- [email protected] 
  | +-- [email protected] 
  | +-- [email protected] 
  | +-- [email protected] 
  | +-- [email protected] 
  | +-- [email protected] 
  | `-- [email protected] 
  +-- [email protected] 
  +-- [email protected] 
  | +-- [email protected] 
  | | `-- [email protected] 
  | |   `-- [email protected] 
  | +-- [email protected] 
  | `-- [email protected] 
  +-- [email protected] 
  +-- [email protected] 
  +-- [email protected] 
  | `-- [email protected] 
  +-- [email protected] 
  | `-- [email protected] 
  `-- [email protected] 
    +-- [email protected] 
    +-- [email protected] 
    | +-- [email protected] 
    | | `-- [email protected] 
    | +-- [email protected] 
    | | `-- [email protected] 
    | +-- [email protected] 
    | | `-- [email protected] 
    | |   +-- [email protected] 
    | |   `-- [email protected] 
    | +-- [email protected] 
    | +-- [email protected] 
    | | `-- [email protected] 
    | `-- [email protected] 
    +-- [email protected] 
    | `-- [email protected] 
    |   `-- [email protected] 
    |     +-- [email protected] 
    |     | +-- [email protected] 
    |     | `-- [email protected] 
    |     +-- [email protected] 
    |     `-- [email protected] 
    |       +-- [email protected] 
    |       `-- [email protected] 
    +-- [email protected] 
    +-- [email protected] 
    | `-- [email protected] 
    +-- [email protected] 
    | +-- [email protected] 
    | `-- [email protected] 
    +-- [email protected] 
    | `-- [email protected] 
    |   `-- [email protected] 
    `-- [email protected] 
      `-- [email protected] 

Then, I try to run gulp again and get the same error:

PS D:\home\site\wwwroot> gulp
[01:49:48] Local gulp not found in D:\home\site\wwwroot
[01:49:48] Try running: npm install gulp

I then run npm install gulp

and the output after running gulp

module.js:327
    throw err;
    ^

Error: Cannot find module 'browser-sync'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (D:\home\site\wwwroot\gulpfile.js:3:19)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)

I've been running into this a lot with npm install in the kudu environment, where i'll run npm install and it's always a partial install and i'll have to continue down the list of required modules in say, app.js (when i try to run npm start), or the gulp file and manually install them until all the required modules are satisfied.. any idea why that happens?

@davidebbo
Copy link
Member

This looks related to #1573

@jvano
Copy link
Member

jvano commented Apr 29, 2024

Hi

If the problem persists and is related to running it on Azure App Service, please open a support incident in Azure:
https://learn.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request

This way we can better track and assist you on this case

Thanks,

Joaquin Vano
Azure App Service

@jvano jvano closed this as completed Apr 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants