ooade / pimg

:camera: Mini Image Lazy Loader for P(R)eact and Vue
https://pimg.surge.sh
MIT License
99 stars 11 forks source link

tried to set the project up on my windows 10 #28

Closed Oluwasetemi closed 6 years ago

Oluwasetemi commented 6 years ago

i ran npm install to set it up an got this error.

>pimg@1.1.3 minify:cjs C:\Users\setemiojo\Desktop\projects\r\pimg
> uglifyjs $npm_package_main -cm -o $npm_package_main --source-map

ERROR: ENOENT: no such file or directory, open 'C:\Users\setemiojo\Desktop\projects\r\pimg\$npm_package_main'

using git-bash terminal, node v8.12.0 , npm v6.4.0

ooade commented 6 years ago

I'm shocked this didn't work. NPM allows variables using $npm_package_{A KEY IN PACKAGE.JSON} and since main exist, it should work fine. But, I'll look into this tho.

Thanks for reporting.

ooade commented 6 years ago

@Oluwasetemi BTW, this happened after installing packages right?

Oluwasetemi commented 6 years ago

Yes!!

ooade commented 6 years ago

Your dependencies properly didn't install completely

Oluwasetemi commented 6 years ago

i should run it again? I am having issues with npm lately especially anytime i am setting for a large project

ooade commented 6 years ago

Yeah. Try running again. I'm not sure what your npm issues might be as I can't reproduce(I'm not using windows)

Oluwasetemi commented 6 years ago

same error no such file or directory, open '$npm_package_main' $npm_package_main is an aliase right? for the main package in the node_modules

ooade commented 6 years ago

Not entirely. It's how variables in npm scripts are retrieved. Windows must have another way of resolving this. Lemme check.

ooade commented 6 years ago

It's different in windows. They use %npm_package_main%. I'll have to write a fix for this later. Thanks for reporting :+1:

Oluwasetemi commented 6 years ago

I might need a guide on how to start this open source contribution !! you are just in the flow of the fire๐Ÿ”ฅ

Oluwasetemi commented 6 years ago

$npm_package_version - %npm_package_version% too right?

ooade commented 6 years ago

There you go! Install cross-var as devDependencies and follow the guide in the readme.

Awaiting a PR :grin:

Oluwasetemi commented 6 years ago

That mean I have to leave it like it was before....then use cross-var to watch everything

ooade commented 6 years ago

Yeah

ooade commented 6 years ago

Because changing it to windows style will break it on linux.

Oluwasetemi commented 6 years ago

Peace at last! I can now try to understand the project.. Thanks again.

Oluwasetemi commented 6 years ago

sending a PR soon.

Oluwasetemi commented 6 years ago

Here goes the PR๐Ÿš€๐Ÿ‘ฉโ€๐Ÿš€