Guest User

logs

a guest
Sep 25th, 2018
1,317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.18 KB | None | 0 0
  1. I'm trying to require sharp for a node web project but I'm getting an error
  2. PS E:\Computer-Stuff\Javascript\2018\New folder> node .\test.js
  3. internal/modules/cjs/loader.js:718
  4. return process.dlopen(module, path.toNamespacedPath(filename));
  5. ^
  6.  
  7. Error: The specified module could not be found.
  8. \\?\E:\Computer-Stuff\Javascript\2018\New folder\node_modules\sharp\build\Release\sharp.node
  9. at Object.Module._extensions..node (internal/modules/cjs/loader.js:718:18)
  10. at Module.load (internal/modules/cjs/loader.js:599:32)
  11. at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
  12. at Function.Module._load (internal/modules/cjs/loader.js:530:3)
  13. at Module.require (internal/modules/cjs/loader.js:637:17)
  14. at require (internal/modules/cjs/helpers.js:20:18)
  15. at Object.<anonymous> (E:\Computer-Stuff\Javascript\2018\New folder\node_modules\sharp\lib\constructor.js:10:15)
  16. at Module._compile (internal/modules/cjs/loader.js:689:30)
  17. at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
  18. at Module.load (internal/modules/cjs/loader.js:599:32)
  19. EnitoniToday at 9:19 PM
  20. Please show us your code
  21. dumbloleToday at 9:20 PM
  22. sure
  23. index.js
  24. const testMod = require("sharp");
  25.  
  26. console.log("Done!");
  27. package.json
  28. {
  29. "dependencies": {
  30.  
  31. "sharp": "^0.20.8"
  32. }
  33. }
  34. EnitoniToday at 9:21 PM
  35. Did you do npm install ?
  36. dumbloleToday at 9:21 PM
  37. yep
  38. EnitoniToday at 9:21 PM
  39. Do you have libvips installed?
  40. dumbloleToday at 9:21 PM
  41. uh
  42. EnitoniToday at 9:22 PM
  43. wait
  44. hold on
  45. what version of node are you on?
  46. dumbloleToday at 9:22 PM
  47. latest
  48. EnitoniToday at 9:23 PM
  49. Okay yeah I think I know what your issue is
  50. dumbloleToday at 9:23 PM
  51. C:\Users\Super>node --version
  52. v10.11.0
  53.  
  54. C:\Users\Super>
  55. EnitoniToday at 9:23 PM
  56. The specified module could not be found is a windows error
  57. I think sharp is looking for libvips and isn't finding it
  58. dumbloleToday at 9:23 PM
  59. yeah i figured that out
  60. so should i install it?
  61. EnitoniToday at 9:23 PM
  62. Yeah, try that
  63. dumbloleToday at 9:23 PM
  64. alright, thanks
  65. EnitoniToday at 9:23 PM
  66. I use sharp in my own project, though on linux
  67. I've never had to install anything which is why I find it strange
  68. dumbloleToday at 9:24 PM
  69. whoa that's cool
  70. didn't know someone else knew about it
  71. thanks for the help
  72. EnitoniToday at 9:24 PM
  73. https://media.wavedistrict.com/images/c40a6f5655ab7ac208ecbdf6022932263e8b06b0e0a5b8cd1.webp?source=webp-512x512
  74.  
  75. dumbloleToday at 9:24 PM
  76. i hope it works
  77. EnitoniToday at 9:24 PM
  78. done with sharp
  79. dumbloleToday at 9:24 PM
  80. nice
  81. EnitoniToday at 9:24 PM
  82. well I'm pretty sure it's the most popular one
  83. cause I think it's the fastest out of the currently available nodejs image processing libraries
  84. dumbloleToday at 9:25 PM
  85. cool
  86. EnitoniToday at 9:26 PM
  87. when you install libvips, reinstall sharp too
  88. dumbloleToday at 9:26 PM
  89. sure
  90. oh
  91. how'd you figure out I was on windows
  92. ack I still get the same error
  93. @Enitoni any ideas?
  94. EnitoniToday at 9:28 PM
  95. restart cmd
  96. if you're using that
  97. or terminate the vscode terminal
  98. then try again
  99. dumbloleToday at 9:30 PM
  100. rip
  101. did rm ./node_modules
  102. npm install
  103. still doesn't work
  104. EnitoniToday at 9:30 PM
  105. are you getting an error while installing?(edited)
  106. iirc sharp uses node-gyp
  107. dumbloleToday at 9:31 PM
  108. no errors whiles installing
  109. EnitoniToday at 9:31 PM
  110. interesting
  111. dumbloleToday at 9:31 PM
  112. do you have teamviewer
  113. EnitoniToday at 9:31 PM
  114. No
  115. Do you have build tools installed?
  116. https://www.npmjs.com/package/windows-build-tools
  117. npm
  118. windows-build-tools
  119. Install C++ Build Tools for Windows using npm
  120.  
  121. dumbloleToday at 9:32 PM
  122. yes
  123. i do
  124. EnitoniToday at 9:32 PM
  125. Hmm...
  126. dumbloleToday at 9:32 PM
  127. i also installed vs community 2017
  128. EnitoniToday at 9:32 PM
  129. if you do libvips in cmd
  130. dumbloleToday at 9:32 PM
  131. according to this:
  132. EnitoniToday at 9:32 PM
  133. does it recognize it
  134. it's possible it's not in PATH(edited)
  135. dumbloleToday at 9:32 PM
  136. https://www.gatsbyjs.org/docs/gatsby-on-windows/
  137. oh crap
  138. its not in cmd
  139. so uh
  140. i have path open, but what exactly do i put
  141. into my env variables
  142. EnitoniToday at 9:34 PM
  143. hold on
  144. it's
  145. vips
  146. not libvips
  147. my bad
  148. dumbloleToday at 9:34 PM
  149. install vips?
  150. EnitoniToday at 9:35 PM
  151. no
  152. you already installed it
  153. so do vips in cmd
  154. if it doesn't appear then it's not in your path
  155. dumbloleToday at 9:36 PM
  156. oof
  157. what exactly do i put into my path
  158. EnitoniToday at 9:37 PM
  159. just the directory of where libvips is in
  160. that should be it(edited)
  161. dumbloleToday at 9:38 PM
  162. i installed it locally or does it not work like that
  163. EnitoniToday at 9:38 PM
  164. how did you install it
  165. dumbloleToday at 9:38 PM
  166. npm install
  167. should i have done it globally?
  168. EnitoniToday at 9:39 PM
  169. wait
  170. WAIT
  171. do you have antivirus on your computer
  172. this might be a permission error actually
  173. dumbloleToday at 9:39 PM
  174. i didn't have a permission error when installing
  175. i will disable it though
  176. EnitoniToday at 9:40 PM
  177. Windows permissions are stupid like that
  178. try disabling it
  179. and see if it works
  180. I don't run any antivirus on my computer (yeah I'm crazy lol) so I never run into issues like that(edited)
  181. only windows defender which does nothing
  182. dumbloleToday at 9:41 PM
  183. nothing
  184. EnitoniToday at 9:41 PM
  185. Restart your computer
  186. dumbloleToday at 9:42 PM
  187. brb
  188. no success
  189. heck
  190. maybe i should ditch windows
  191. EnitoniToday at 9:44 PM
  192. okay no
  193. dumbloleToday at 9:44 PM
  194. this is pissing me off so much
  195. EnitoniToday at 9:44 PM
  196. do
  197. npm install --verbose sharp(edited)
  198. dumbloleToday at 9:45 PM
  199. i have and theres no error
  200. EnitoniToday at 9:45 PM
  201. just do it
  202. and send me a pastebin of the result
  203. dumbloleToday at 9:45 PM
  204. https://pastebin.com/Zy1gmaNj
  205. Pastebin
  206. PS E:\Computer-Stuff\Javascript\2018\New folder> npm install --ver...
  207.  
  208. EnitoniToday at 9:46 PM
  209. you didn't make that just now
  210. dumbloleToday at 9:47 PM
  211. i did
  212. ?
  213. did i do something wrong
  214. EnitoniToday at 9:47 PM
  215. you may have sent me the wrong pastebin
  216. this one is old
  217. dumbloleToday at 9:47 PM
  218. https://pastebin.com/Zy1gmaNj
  219. Pastebin
  220. PS E:\Computer-Stuff\Javascript\2018\New folder> npm install --ver...
  221.  
  222. what?
  223. EnitoniToday at 9:47 PM
  224. ... that's the same link
  225. dumbloleToday at 9:48 PM
  226. it says september 25th
  227. EnitoniToday at 9:48 PM
  228. and I told you to do npm install --verbose sharp
  229. dumbloleToday at 9:48 PM
  230. oh
  231. https://pastebin.com/qZTwhmct
  232. Pastebin
  233. 9:50 9/25/2018 - Pastebin.com
  234.  
  235. i put the date into the title
  236. thanks for spending your time helping me
  237. EnitoniToday at 9:53 PM
  238. so I tried doing this myself
  239. https://i.imgur.com/1nh65Dn.png
  240.  
  241.  
  242. I'm not sure why it isn't working for you
  243. are you on w10?
  244. dumbloleToday at 9:54 PM
  245. yes
  246. EnitoniToday at 9:54 PM
  247. Hmm...
  248. dumbloleToday at 9:55 PM
  249. any theories?
  250. EnitoniToday at 9:56 PM
  251. I'm looking at where your error spawns from
  252. const sharp = require('../build/Release/sharp.node');
  253. this line here
  254. dumbloleToday at 9:56 PM
  255. it exists i see it
  256. EnitoniToday at 9:56 PM
  257. is where it fails
  258. dumbloleToday at 9:56 PM
  259. in my folder
  260. its in node modules
  261. EnitoniToday at 9:58 PM
  262. In that case it has to be libvips
  263. dumbloleToday at 9:58 PM
  264. okay, so what should i do
  265. EnitoniToday at 9:59 PM
  266. I'm not sure
  267. This should just be working for you
  268. like how it worked fine for me
  269. dumbloleToday at 9:59 PM
  270. i think its because i'm on windows?
  271. EnitoniToday at 9:59 PM
  272. No, because I'm on windows too
  273. dumbloleToday at 9:59 PM
  274. is there something i have to do with build tools and my PATH?
  275. EnitoniToday at 10:00 PM
  276. It's not your build tools
  277. if it was, then sharp would not even install
  278. dumbloleToday at 10:00 PM
  279. i've tried using dependency walker
  280. and it comes up with a bunch of errors
  281. similar to this:
  282. https://github.com/lovell/sharp/issues/710
  283. GitHub
  284. zeit/hyper: Error: The specified module could not be found. · Iss...
  285. I'm on Windows 10 Pro (x64), build seems to work, but require fails. npm i sharp > [email protected] install D:\Code\novascreen\aspnetcore-spa\node_modules\sharp > node-gyp rebuild D:\Code\nov...
  286.  
  287. uh
  288. should i try uninstalling all the random vs community stuff i have
  289. EnitoniToday at 10:02 PM
  290. how are you running your js file
  291. dumbloleToday at 10:02 PM
  292. node
  293. EnitoniToday at 10:02 PM
  294. no from like
  295. what terminal
  296. cmd, powershell?
  297. dumbloleToday at 10:02 PM
  298. powershell
  299.  
  300. i have a bunch of vs community stuff
  301. EnitoniToday at 10:03 PM
  302. it doesn't matter
  303. that's only for build
  304. dumbloleToday at 10:03 PM
  305. okay
  306. EnitoniToday at 10:03 PM
  307. I'm sorry, but I'm afraid the only person who can help you is lovell
  308. dumbloleToday at 10:03 PM
  309. alright, thanks man
  310. appreciate it
  311. EnitoniToday at 10:03 PM
  312. I have ran out of ideas
  313. This is very strange
  314. like I said, it should just be working
  315. I had no issues setting it up on my windows machine
  316. dumbloleToday at 10:04 PM
  317. I agree, because I can't find anything like it on the internet
  318. for the past 3 days
  319. EnitoniToday at 10:04 PM
  320. Yeah, it's... weird
  321. but anyway
  322. I gotta crash
  323. dumbloleToday at 10:04 PM
  324. bye mate
  325. EnitoniToday at 10:04 PM
  326. Goodbye
  327. dumbloleToday at 10:05 PM
  328. my computer is custom built tho
  329. not prebuilt
  330. and then i installed windows os
  331. EnitoniToday at 10:05 PM
  332. so is mine
  333. dumbloleToday at 10:05 PM
  334. ah
  335. well anyways, thanks a lot
  336. EnitoniToday at 10:06 PM
  337. Ryzen 5 + Geforce 1060 and 16gb of ram with an B350+ motherboard(edited)
  338. fully custom built
  339. so I don't think that's where the issue is
  340. dumbloleToday at 10:06 PM
  341. nice nice
Advertisement
Add Comment
Please, Sign In to add comment