0
, 그것은 이런 일이
npm
으로 나에게 발생이 처음 확인의
NPM 설치 모듈을 가져올 수 없습니다 npm install --save node-uuid
노드
을하지만 그것을 I를 가져올 때
> require('node-uuid')
Error: Cannot find module 'node-uuid'
at Function.Module._resolveFilename (module.js:327:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:355:17)
at require (internal/module.js:13:17)
at repl:1:1
at REPLServer.defaultEval (repl.js:252:27)
at bound (domain.js:281:14)
at REPLServer.runBound [as eval] (domain.js:294:12)
at REPLServer.<anonymous> (repl.js:417:12)
at emitOne (events.js:83:20)
을하지만 수동으로 모듈을 가져 오는 경우가 작동합니다 : 오류가
> require('./node_modules/node-uuid')
{ [Function: v4]
v1: [Function: v1],
v4: [Circular],
...
,536,
두 명령은 동일한 Node.js 쉘에서 실행되므로 동일한 폴더에 있습니다.
어떻게 가능합니까? 어떠한 제안?
전체 출력 :
amatiasq:~/repos/test$ ls node_modules/
node-uuid
amatiasq:~/repos/test$ node
> require('./node_modules/node-uuid')
{ [Function: v4]
v1: [Function: v1],
v4: [Circular],
parse: [Function: parse],
unparse: [Function: unparse],
BufferClass:
{ [Function: Buffer]
poolSize: 8192,
isBuffer: [Function: isBuffer],
compare: [Function: compare],
isEncoding: [Function],
concat: [Function],
byteLength: [Function: byteLength] },
_rng: [Function],
_mathRNG: undefined,
_nodeRNG: [Function],
_whatwgRNG: undefined }
> require('node-uuid')
Error: Cannot find module 'node-uuid'
at Function.Module._resolveFilename (module.js:327:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:355:17)
at require (internal/module.js:13:17)
at repl:1:1
at REPLServer.defaultEval (repl.js:252:27)
at bound (domain.js:281:14)
at REPLServer.runBound [as eval] (domain.js:294:12)
at REPLServer.<anonymous> (repl.js:417:12)
at emitOne (events.js:83:20)
>
'4.4'에 복제 할 수 없습니다. 어떤 노드 버전을 사용하고 있습니까? –
'package.json'은 정상입니까? –
@FelipeSabino 노드 : v5.2.0 & NPM : 3.3.12 –