How do i solve cannot find module 'pacote' - laravel

sourav#Sourav-Dell:/opt/lampp/htdocs/Projects/Laravel-Projects/Laravel9$ npm install
Error: Cannot find module 'pacote'
Require stack:
/usr/local/lib/node_modules/npm/lib/utils/update-notifier.js
/usr/local/lib/node_modules/npm/lib/cli.js
/usr/local/lib/node_modules/npm/bin/npm-cli.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (/usr/local/lib/node_modules/npm/lib/utils/update-notifier.js:5:16)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
I don't know how to fix it, please help me.

Related

not able to run rake db:create in windows to install fedena

getting error on running cmd in windows Please help me what to do: here is rake
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for
example lib/tasks/capistrano.rake, and they will automatically be available to
Rake.
require(File.join(File.dirname(__FILE__), 'config', 'boot'))
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'tasks/rails'
and here is the cmd window
c:\Fedena>rake db:create --trace
(in c:/Fedena)
rake aborted!
c:/Fedena/Rakefile:3: syntax error, unexpected kAND
...lib/tasks/capistrano.rake, and they will automatically be av...
^
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `load'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `raw_load_rakefile'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2017:in `load_rakefile'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2016:in `load_rakefile'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in `run'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
C:/Ruby187/bin/rake:23:in `load'
C:/Ruby187/bin/rake:23
Shouldn't this part be commented out?
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for
#example lib/tasks/capistrano.rake, and they will automatically be available to
#Rake.
require(File.join(File.dirname(__FILE__), 'config', 'boot'))
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'tasks/rails'
Looks like it's not commented out and ruby is trying to run it as code
My installation is successful. Below is my rake file content:
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require(File.join(File.dirname(__FILE__), 'config', 'boot'))
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'tasks/rails'
Copy and paste the above content in your rake file and try again

deploying a yeoman angular app to heroku

I deployed my yeoman fullstack app and I get an error:
An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your logs for details.
I am trying to deploy an application on heroku for the first time.Any pointers to fix this?
I have followed regular tutorials to get this up on heroky, used grunt build and grunt dist:serve and it runs just fine locally without any errors.
My logs look like this:
2016-03-31T01:04:08.910519+00:00 heroku[web.1]: State changed from starting to crashed
2016-03-31T02:27:45.799910+00:00 heroku[web.1]: State changed from crashed to starting
2016-03-31T02:27:47.434640+00:00 heroku[web.1]: Starting process with command `npm start`
2016-03-31T02:27:49.777251+00:00 app[web.1]:
2016-03-31T02:27:49.777274+00:00 app[web.1]: > angular-test#0.0.0 start /app
2016-03-31T02:27:49.777275+00:00 app[web.1]: > node server/app.js
2016-03-31T02:27:49.777275+00:00 app[web.1]:
2016-03-31T02:27:50.437299+00:00 app[web.1]: fs.js:892
2016-03-31T02:27:50.437312+00:00 app[web.1]: return binding.stat(pathModule._makeLong(path));
2016-03-31T02:27:50.437313+00:00 app[web.1]: ^
2016-03-31T02:27:50.437313+00:00 app[web.1]:
2016-03-31T02:27:50.437314+00:00 app[web.1]: Error: ENOENT: no such file or directory, stat '/app/public/favicon.ico'
2016-03-31T02:27:50.437314+00:00 app[web.1]: at Error (native)
2016-03-31T02:27:50.437315+00:00 app[web.1]: at Object.fs.statSync (fs.js:892:18)
2016-03-31T02:27:50.437316+00:00 app[web.1]: at favicon (/app/node_modules/serve-favicon/index.js:47:15)
2016-03-31T02:27:50.437316+00:00 app[web.1]: at module.exports (/app/server/config/express.js:35:13)
2016-03-31T02:27:50.437328+00:00 app[web.1]: at Object.<anonymous> (/app/server/app.js:27:28)
2016-03-31T02:27:50.437329+00:00 app[web.1]: at Module._compile (module.js:413:34)
2016-03-31T02:27:50.437330+00:00 app[web.1]: at Object.Module._extensions..js (module.js:422:10)
2016-03-31T02:27:50.437330+00:00 app[web.1]: at Module.load (module.js:357:32)
2016-03-31T02:27:50.437331+00:00 app[web.1]: at Function.Module._load (module.js:314:12)
2016-03-31T02:27:50.437331+00:00 app[web.1]: at Function.Module.runMain (module.js:447:10)
2016-03-31T02:27:50.437332+00:00 app[web.1]: at startup (node.js:142:18)
2016-03-31T02:27:50.437332+00:00 app[web.1]: at node.js:939:3
2016-03-31T02:27:50.446714+00:00 app[web.1]:
2016-03-31T02:27:50.455228+00:00 app[web.1]: npm ERR! Linux 3.13.0-79-generic
2016-03-31T02:27:50.455710+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2016-03-31T02:27:50.455963+00:00 app[web.1]: npm ERR! node v5.9.1
2016-03-31T02:27:50.456507+00:00 app[web.1]: npm ERR! npm v3.7.3
2016-03-31T02:27:50.456774+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2016-03-31T02:27:50.456952+00:00 app[web.1]: npm ERR! angular-test#0.0.0 start: `node server/app.js`
2016-03-31T02:27:50.457115+00:00 app[web.1]: npm ERR! Exit status 1
2016-03-31T02:27:50.457427+00:00 app[web.1]: npm ERR!
2016-03-31T02:27:50.457580+00:00 app[web.1]: npm ERR! Failed at the angular-test#0.0.0 start script 'node server/app.js'.
2016-03-31T02:27:50.457778+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed.
2016-03-31T02:27:50.457968+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the angular-test package,
2016-03-31T02:27:50.458168+00:00 app[web.1]: npm ERR! not with npm itself.
2016-03-31T02:27:50.458354+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2016-03-31T02:27:50.458728+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with:
2016-03-31T02:27:50.458538+00:00 app[web.1]: npm ERR! node server/app.js
2016-03-31T02:27:50.458921+00:00 app[web.1]: npm ERR! npm bugs angular-test
2016-03-31T02:27:50.459097+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via:
2016-03-31T02:27:50.460235+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2016-03-31T02:27:50.460234+00:00 app[web.1]: npm ERR! npm owner ls angular-test
2016-03-31T02:27:50.465300+00:00 app[web.1]:
2016-03-31T02:27:50.465522+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2016-03-31T02:27:50.465631+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2016-03-31T02:27:51.249320+00:00 heroku[web.1]: State changed from starting to crashed
2016-03-31T02:27:51.235239+00:00 heroku[web.1]: Process exited with status 1
2016-03-31T05:14:03.873070+00:00 heroku[web.1]: State changed from crashed to starting
2016-03-31T05:14:05.244594+00:00 heroku[web.1]: Starting process with command `npm start`
2016-03-31T05:14:07.170039+00:00 app[web.1]:
2016-03-31T05:14:07.170054+00:00 app[web.1]: > angular-test#0.0.0 start /app
2016-03-31T05:14:07.170055+00:00 app[web.1]: > node server/app.js
2016-03-31T05:14:07.170056+00:00 app[web.1]:
2016-03-31T05:14:07.671688+00:00 app[web.1]: fs.js:892
2016-03-31T05:14:07.671722+00:00 app[web.1]: return binding.stat(pathModule._makeLong(path));
2016-03-31T05:14:07.671723+00:00 app[web.1]: ^
2016-03-31T05:14:07.671724+00:00 app[web.1]:
2016-03-31T05:14:07.671731+00:00 app[web.1]: Error: ENOENT: no such file or directory, stat '/app/public/favicon.ico'
2016-03-31T05:14:07.671731+00:00 app[web.1]: at Error (native)
2016-03-31T05:14:07.671732+00:00 app[web.1]: at Object.fs.statSync (fs.js:892:18)
2016-03-31T05:14:07.671733+00:00 app[web.1]: at favicon (/app/node_modules/serve-favicon/index.js:47:15)
2016-03-31T05:14:07.671733+00:00 app[web.1]: at module.exports (/app/server/config/express.js:35:13)
2016-03-31T05:14:07.671734+00:00 app[web.1]: at Object.<anonymous> (/app/server/app.js:27:28)
2016-03-31T05:14:07.671734+00:00 app[web.1]: at Module._compile (module.js:413:34)
2016-03-31T05:14:07.671735+00:00 app[web.1]: at Object.Module._extensions..js (module.js:422:10)
2016-03-31T05:14:07.671735+00:00 app[web.1]: at Module.load (module.js:357:32)
2016-03-31T05:14:07.671736+00:00 app[web.1]: at Function.Module._load (module.js:314:12)
2016-03-31T05:14:07.671736+00:00 app[web.1]: at Function.Module.runMain (module.js:447:10)
2016-03-31T05:14:07.671737+00:00 app[web.1]: at startup (node.js:142:18)
2016-03-31T05:14:07.671738+00:00 app[web.1]: at node.js:939:3
2016-03-31T05:14:07.685504+00:00 app[web.1]:
2016-03-31T05:14:07.696144+00:00 app[web.1]: npm ERR! Linux 3.13.0-77-generic
2016-03-31T05:14:07.696638+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2016-03-31T05:14:07.696930+00:00 app[web.1]: npm ERR! node v5.9.1
2016-03-31T05:14:07.697704+00:00 app[web.1]: npm ERR! npm v3.7.3
2016-03-31T05:14:07.697991+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2016-03-31T05:14:07.698208+00:00 app[web.1]: npm ERR! angular-test#0.0.0 start: `node server/app.js`
2016-03-31T05:14:07.698406+00:00 app[web.1]: npm ERR! Exit status 1
2016-03-31T05:14:07.698612+00:00 app[web.1]: npm ERR!
2016-03-31T05:14:07.698816+00:00 app[web.1]: npm ERR! Failed at the angular-test#0.0.0 start script 'node server/app.js'.
2016-03-31T05:14:07.699013+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed.
2016-03-31T05:14:07.699208+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the angular-test package,
2016-03-31T05:14:07.699396+00:00 app[web.1]: npm ERR! not with npm itself.
2016-03-31T05:14:07.699601+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2016-03-31T05:14:07.699789+00:00 app[web.1]: npm ERR! node server/app.js
2016-03-31T05:14:07.700018+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with:
2016-03-31T05:14:07.700228+00:00 app[web.1]: npm ERR! npm bugs angular-test
2016-03-31T05:14:07.700419+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via:
2016-03-31T05:14:07.700613+00:00 app[web.1]: npm ERR! npm owner ls angular-test
2016-03-31T05:14:07.700803+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2016-03-31T05:14:07.706094+00:00 app[web.1]:
2016-03-31T05:14:07.706368+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2016-03-31T05:14:07.706545+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2016-03-31T05:14:08.424826+00:00 heroku[web.1]: State changed from starting to crashed
2016-03-31T05:14:08.402585+00:00 heroku[web.1]: Process exited with status 1
2016-03-31T08:32:27.825054+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=mozzoweb.herokuapp.com request_id=28e3e7fd-8664-400b-8e78-8cf4809086ef fwd="120.59.15.145" dyno= connect= service= status=503 bytes=
2016-03-31T08:32:28.447942+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=mozzoweb.herokuapp.com request_id=3989001b-7a89-4aab-8461-e81d0dff0617 fwd="120.59.15.145" dyno= connect= service= status=503 bytes=
2016-03-31T08:32:38.385147+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=mozzoweb.herokuapp.com request_id=098cabd0-15ed-43f3-98b9-01c3130b1420 fwd="120.59.15.145" dyno= connect= service= status=503 bytes=
2016-03-31T08:32:39.202068+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=mozzoweb.herokuapp.com request_id=003a4589-f69c-4219-86cf-5c8e85c1bfb9 fwd="120.59.15.145" dyno= connect= service= status=503 bytes=
2016-03-31T08:35:40.667394+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=mozzoweb.herokuapp.com request_id=ad81d2ef-4452-434c-b8e1-bd4935b372b5 fwd="120.59.15.145" dyno= connect= service= status=503 bytes=
[10860:10860:0331/140541:ERROR:navigation_entry_screenshot_manager.cc(141)] Invalid entry with unique id: 252
2016-03-31T08:35:41.674390+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=mozzoweb.herokuapp.com request_id=44245240-90ba-4836-bd79-ee37d69ddfad fwd="120.59.15.145" dyno= connect= service= status=503 bytes=

Yeoman Error: Cannot find module 'globby'

I am following the steps to use the Yeoman generator meanjs, but I am getting this error:
Error: Cannot find module 'globby'
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/usr/local/lib/node_modules/yo/node_modules/yeoman-environment/lib/resolver.js:5:14)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at your root directory
npm install --save globby#3.0.0
restart

bundle install: TypeError: Arguments to path.resolve must be strings

I get this error when trying to use bundle install - does anyone have any idea what might be causing it?
$ bundle install
path.js:439
throw new TypeError('Arguments to path.resolve must be strings');
^
TypeError: Arguments to path.resolve must be strings
at Object.posix.resolve (path.js:439:13)
at Object.<anonymous> (/usr/local/lib/node_modules/script/bin/bundle:38:24)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
Example gemfile:
source 'https://rubygems.org'
gem 'capybara'
This is rather odd but while trying something I accidentally typo'ed bundler install (rather than bundle install) and it worked...
$ bundler install
Resolving dependencies...
Using builder 3.2.2
Using mime-types 2.6.1
Using mini_portile 0.6.2
Using nokogiri 1.6.6.2
Using rack 1.6.4
Using rack-test 0.6.3
Using xpath 2.0.0
Using capybara 2.4.4
Using ffi 1.9.10
Using childprocess 0.5.6
Using cmdparse 3.0.1
Using multi_json 1.11.2
Using gherkin 2.12.2
Using cucumber-core 1.2.0
Using diff-lcs 1.2.5
Using multi_test 0.1.2
Using cucumber 2.0.2
Using unf_ext 0.0.7.1
Using unf 0.1.4
Using domain_name 0.5.24
Using highline 1.7.3
Using http-cookie 1.0.2
Using json 1.8.3
Using net-http-persistent 2.9.4
Using net-ssh 2.9.2
Using net-ssh-gateway 1.2.0
Using netrc 0.10.3
Using parallel 1.6.1
Using parallel_tests 0.15.0
Using require_all 1.3.2
Using rest-client 1.8.0
Using rspec-support 3.3.0
Using rspec-core 3.3.2
Using rspec-expectations 3.3.1
Using rspec-mocks 3.3.2
Using rspec 3.3.0
Using rubyzip 1.1.7
Using sauce_whisk 0.0.18
Using websocket 1.2.2
Using selenium-webdriver 2.46.2
Using sauce 3.1.3
Using sauce-connect 3.1.0
Using watir-webdriver 0.8.0
Using bundler 1.10.6
Bundle complete! 9 Gemfile dependencies, 44 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed
But still when I type bundle install:
$ bundle install
path.js:439
throw new TypeError('Arguments to path.resolve must be strings');
^
TypeError: Arguments to path.resolve must be strings
at Object.posix.resolve (path.js:439:13)
at Object.<anonymous> (/usr/local/lib/node_modules/script/bin/bundle:38:24)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3

Sinatra on heroku production tries to load development gems

Trying to learn Sinatra I just deployed a simple app to heroku.
My config file:
require './main'
require 'sinatra'
run Sinatra::Application
Gemfile:
source 'http://rubygems.org'
ruby '1.9.3'
gem 'sinatra'
gem 'slim'
gem 'sass'
gem 'dm-core'
gem 'dm-migrations'
gem 'thin'
gem 'pg', :group => :production
gem 'dm-postgres-adapter', :group => :production
gem 'dm-sqlite-adapter', :group => :development
I get following error in the logs:
2015-03-31T09:13:54.051645+00:00 heroku[web.1]: State changed from crashed to starting
2015-03-31T09:13:57.281158+00:00 heroku[web.1]: Starting process with command `bundle exec ruby main.rb -p 28463`
2015-03-31T09:13:59.598142+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/dm-core-1.2.1/lib/dm-core/adapters.rb:163:in `require': cannot load such file -- dm-sqlite-adapter (LoadError)
2015-03-31T09:13:59.598161+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/dm-core-1.2.1/lib/dm-core/adapters.rb:163:in `load_adapter'
2015-03-31T09:13:59.598164+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/dm-core-1.2.1/lib/dm-core/adapters.rb:133:in `adapter_class'
2015-03-31T09:13:59.598165+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/dm-core-1.2.1/lib/dm-core/adapters.rb:13:in `new'
2015-03-31T09:13:59.598167+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/dm-core-1.2.1/lib/dm-core.rb:230:in `setup'
2015-03-31T09:13:59.598169+00:00 app[web.1]: from /app/song.rb:5:in `block in <top (required)>'
2015-03-31T09:13:59.598171+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1410:in `configure'
2015-03-31T09:13:59.598172+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1989:in `block (2 levels) in delegate'
2015-03-31T09:13:59.598174+00:00 app[web.1]: from /app/song.rb:4:in `<top (required)>'
2015-03-31T09:13:59.598178+00:00 app[web.1]: from main.rb:6:in `require'
2015-03-31T09:13:59.598187+00:00 app[web.1]: from main.rb:6:in `<main>'
2015-03-31T09:14:00.479331+00:00 heroku[web.1]: State changed from starting to crashed
2015-03-31T09:14:00.461548+00:00 heroku[web.1]: Process exited with status 1
I tried the solution proposed here but it did not work.
Thanks in advance for ideas
I think you need datamapper in your Gemfile.
gem "datamapper"

Resources