contextify icon indicating copy to clipboard operation
contextify copied to clipboard

unable to install npm in local project directory

Open redrowthueswar opened this issue 10 years ago • 6 comments

I'm opening this issue because:

i am trying npm installation, some problems npm installtion time.... i was given python path in environmental variables and also set the path in cmd like..(npm config set python C:\Python27\python.exe) but it display below errors......how to resolve this errors?

StackTrace: npm issue

D:\bimflow-singtemplate\bimflow>npm install npm WARN package.json [email protected] No repository field. npm WARN package.json [email protected] scripts['server'] should probably be scripts['s tart']. npm WARN package.json [email protected] No README data npm WARN package.json [email protected] No repository field. npm WARN package.json [email protected] No repository field. npm WARN package.json [email protected] No repository field. npm WARN package.json [email protected] 'repositories' (plural) Not supported. Ple ase pick one as the 'repository' field npm WARN package.json [email protected] No description npm WARN package.json @angular/[email protected] No description npm WARN package.json @angular/[email protected] No repository field. npm WARN package.json @angular/[email protected] No description npm WARN package.json @angular/[email protected] No repository field. npm WARN package.json @angular/[email protected] No description npm WARN package.json @angular/[email protected] No repository field. npm WARN package.json @angular/[email protected] No description npm WARN package.json @angular/[email protected] No repository field. npm WARN package.json @angular/[email protected] No description npm WARN package.json @angular/[email protected] No repository field. npm WARN package.json @angular/[email protected] No descriptio n npm WARN package.json @angular/[email protected] No repository field. npm WARN package.json @angular/[email protected] No description npm WARN package.json @angular/[email protected] No repository field. npm WARN package.json @angular/[email protected] No description npm WARN package.json @angular/[email protected] No repository field.

npm WARN package.json @angular/[email protected] No description npm WARN package.json @angular/[email protected] No repository field. \

[email protected] install D:\bimflow-singtemplate\bimflow\node_modules\ricksha w\node_modules\d3\node_modules\jsdom\node_modules\contextify node-gyp rebuild D:\bimflow-singtemplate\bimflow\node_modules\rickshaw\node_modules\d3\node_modul es\jsdom\node_modules\contextify>if not defined npm_config_node_gyp (node "C:\Pr ogram Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\n ode-gyp\bin\node-gyp.js" rebuild ) else (rebuild) Traceback (most recent call last): File "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\gyp \gyp_main.py", line 18, in sys.exit(gyp.script_main()) File "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\gyp \pylib\gyp__init__.py", line 534, in script_main return main(sys.argv[1:]) File "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\gyp \pylib\gyp__init__.py", line 527, in main return gyp_main(args) File "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\gyp \pylib\gyp__init__.py", line 503, in gyp_main options.circular_check) File "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\gyp \pylib\gyp__init__.py", line 98, in Load generator.CalculateVariables(default_variables, params) File "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\gyp \pylib\gyp\generator\msvs.py", line 1867, in CalculateVariables generator_flags.get('msvs_version', 'auto')) File "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\gyp \pylib\gyp\MSVSVersion.py", line 402, in SelectVisualStudioVersion versions = _DetectVisualStudioVersions(version_map[version], 'e' in version)

**KeyError: '2015' gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files (x86)\nodejs\node_ modules\npm\node_modules\node-gyp\lib\configure.js:343:16) gyp ERR! stack at ChildProcess.emit (events.js:110:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074 :12) gyp ERR! System Windows_NT 6.3.9600 gyp ERR! command "node" "C:\Program Files (x86)\nodejs\node_modules\npm\nod e_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd D:\bimflow-singtemplate\bimflow\node_modules\rickshaw\node_modules
d3\node_modules\jsdom\node_modules\contextify gyp ERR! node -v v0.12.2 gyp ERR! node-gyp -v v1.0.3 gyp ERR! not ok npm ERR! Windows_NT 6.3.9600 npm ERR! argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files ( x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" npm ERR! node v0.12.2 npm ERR! npm v2.7.4 npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'. npm ERR! This is most likely a problem with the contextify package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get their info via: npm ERR! npm owner ls contextify npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! D:\bimflow-singtemplate\bimflow\npm-debug.log

redrowthueswar avatar Jul 13 '16 11:07 redrowthueswar

Similar problems with Sing 3.1.1

Read other issues and tried several things (like downgrading npm), but no success. Help is highly appreciated! My logs on Ubuntu 16.04

npm install [email protected]

> [email protected] install /data/mark/sites/mx1-admin/node_modules/contextify
> node-gyp rebuild

make: Entering directory '/data/mark/sites/mx1-admin/node_modules/contextify/build'
  CXX(target) Release/obj.target/contextify/src/contextify.o
../src/contextify.cc: In static member function 'static v8::Local<v8::Context> ContextWrap::createV8Context(v8::Local<v8::Object>)':
../src/contextify.cc:131:68: warning: 'v8::Local<v8::Object> v8::Function::NewInstance() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
         Local<Object> wrapper = Nan::New(constructor)->NewInstance();
                                                                    ^
In file included from /home/markr/.node-gyp/6.2.2/include/node/v8.h:23:0,
                 from /home/markr/.node-gyp/6.2.2/include/node/node.h:42,
                 from ../src/contextify.cc:1:
/home/markr/.node-gyp/6.2.2/include/node/v8.h:3243:52: note: declared here
   V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
                                                    ^
/home/markr/.node-gyp/6.2.2/include/node/v8config.h:339:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^
../src/contextify.cc:151:72: warning: 'void v8::ObjectTemplate::SetAccessCheckCallbacks(v8::NamedSecurityCallback, v8::IndexedSecurityCallback, v8::Local<v8::Value>)' is deprecated: Use SetAccessCheckCallback instead [-Wdeprecated-declarations]
                                        GlobalPropertyIndexedAccessCheck);
                                                                        ^
In file included from /home/markr/.node-gyp/6.2.2/include/node/v8.h:23:0,
                 from /home/markr/.node-gyp/6.2.2/include/node/node.h:42,
                 from ../src/contextify.cc:1:
/home/markr/.node-gyp/6.2.2/include/node/v8.h:4769:12: note: declared here
       void SetAccessCheckCallbacks(NamedSecurityCallback named_handler,
            ^
/home/markr/.node-gyp/6.2.2/include/node/v8config.h:339:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^
../src/contextify.cc: In static member function 'static void ContextWrap::GlobalPropertyGetter(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Value>&)':
../src/contextify.cc:182:80: warning: 'v8::Local<v8::Value> v8::Object::GetRealNamedProperty(v8::Local<v8::String>)' is deprecated: Use maybe version [-Wdeprecated-declarations]
         Local<Value> rv = Nan::New(ctx->sandbox)->GetRealNamedProperty(property);
                                                                                ^
In file included from /home/markr/.node-gyp/6.2.2/include/node/v8.h:23:0,
                 from /home/markr/.node-gyp/6.2.2/include/node/node.h:42,
                 from ../src/contextify.cc:1:
/home/markr/.node-gyp/6.2.2/include/node/v8.h:2903:30: note: declared here
                 Local<Value> GetRealNamedProperty(Local<String> key));
                              ^
/home/markr/.node-gyp/6.2.2/include/node/v8config.h:339:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^
../src/contextify.cc: In static member function 'static void ContextWrap::GlobalPropertyQuery(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Integer>&)':
../src/contextify.cc:209:67: warning: 'v8::Local<v8::Value> v8::Object::GetRealNamedProperty(v8::Local<v8::String>)' is deprecated: Use maybe version [-Wdeprecated-declarations]
         if (!Nan::New(ctx->sandbox)->GetRealNamedProperty(property).IsEmpty() ||
                                                                   ^
In file included from /home/markr/.node-gyp/6.2.2/include/node/v8.h:23:0,
                 from /home/markr/.node-gyp/6.2.2/include/node/node.h:42,
                 from ../src/contextify.cc:1:
/home/markr/.node-gyp/6.2.2/include/node/v8.h:2903:30: note: declared here
                 Local<Value> GetRealNamedProperty(Local<String> key));
                              ^
/home/markr/.node-gyp/6.2.2/include/node/v8config.h:339:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^
../src/contextify.cc:210:71: warning: 'v8::Local<v8::Value> v8::Object::GetRealNamedProperty(v8::Local<v8::String>)' is deprecated: Use maybe version [-Wdeprecated-declarations]
             !Nan::New(ctx->proxyGlobal)->GetRealNamedProperty(property).IsEmpty()) {
                                                                       ^
In file included from /home/markr/.node-gyp/6.2.2/include/node/v8.h:23:0,
                 from /home/markr/.node-gyp/6.2.2/include/node/node.h:42,
                 from ../src/contextify.cc:1:
/home/markr/.node-gyp/6.2.2/include/node/v8.h:2903:30: note: declared here
                 Local<Value> GetRealNamedProperty(Local<String> key));
                              ^
/home/markr/.node-gyp/6.2.2/include/node/v8config.h:339:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^
./Release/.deps/Release/obj.target/contextify/src/contextify.o.d.raw { dev: 69,
  mode: 33204,
  nlink: 1,
  uid: 1024,
  gid: 100,
  rdev: 0,
  blksize: 131072,
  ino: 98577598,
  size: 1261,
  blocks: 8,
  atime: 2016-07-28T10:07:04.000Z,
  mtime: 2016-07-28T10:07:04.000Z,
  ctime: 2016-07-28T10:07:04.353Z,
  birthtime: 2016-07-28T10:07:04.353Z }
  SOLINK_MODULE(target) Release/obj.target/contextify.node
  COPY Release/contextify.node
cp: preserving permissions for 'Release/contextify.node': Operation not permitted
contextify.target.mk:132: recipe for target 'Release/contextify.node' failed
make: *** [Release/contextify.node] Error 1
make: Leaving directory '/data/mark/sites/mx1-admin/node_modules/contextify/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Linux 4.4.6-1-pve
gyp ERR! command "/usr/local/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /data/mark/sites/mx1-admin/node_modules/contextify
gyp ERR! node -v v6.2.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN [email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN [email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN [email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN [email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN [email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN [email protected] requires a peer of reflect-metadata@^0.1.3 but none was installed.
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
npm ERR! Linux 4.4.6-1-pve
npm ERR! argv "/usr/local/bin/node" "/usr/bin/npm" "install" "[email protected]"
npm ERR! node v6.2.2
npm ERR! npm  v3.10.5
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs contextify
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls contextify
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /data/mark/sites/mx1-admin/npm-debug.log

mroeling avatar Jul 28 '16 10:07 mroeling

@redrowthueswar @mroeling You guys clearly don't know how does markdown for code works.

ummahusla avatar Oct 07 '16 14:10 ummahusla

@brianmcd There are several install issues besides this one open and without comment from you or anyone from the project that are actually trying to help. Do you have any idea about what could be going on with your project and these node-gyp errors? From the looks of all of these issues, it isn't tied to any OS or version of node/npm. Please respond. To be clear, I'm not demanding you swoop in and fix everything. I am just asking for a response and some discussion about what you think could be causing these issues. Thank you.

kyle-hall avatar Oct 19 '16 16:10 kyle-hall

@kyle-hall It looks like the module is broken on node 6 (not sure if it's all versions, I only tried the latest). Updating nan to 2.4.0 gets it down to only warnings. I'd merge a PR that fixed the warnings, if you or anyone else is up for it.

brianmcd avatar Oct 19 '16 16:10 brianmcd

@brianmcd Great, thanks. Does that mean you're doing a new release with the updated version of nan? Or should we change that ourselves locally?

I did try downgrading to Node 4.6, and my errors went away. But, I also reinstalled the .NET framework and Visual Build Tools, as well, which may have helped. I'm not sure if Node 4 will solve all problems, however as this issue (https://github.com/brianmcd/contextify/issues/202) shows them having Node 4 and they still run into the issue.

kyle-hall avatar Oct 19 '16 18:10 kyle-hall

** Sharing here, since this issue still open.

I had the same problem and here is how I solved:

$ rm -rf node_modules
$ sudo npm install
$ npm start

For some cryptic reason, node-gyp requires something that's related to my sudo user. I'm investigating yet, but I'm sharing this here because this information could be useful for someone else.

Before that I did:

  • How I'm using nvm to manage NodeJS versions (Currently I'm using versions 4.3.2, 5.7.0 and 6.7.0) I removed and installed again;
  • How I notice that node-gyp uses tools like make, I updated my computer using brew update;

willmendesneto avatar Feb 23 '17 05:02 willmendesneto