Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

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

Closed
Oluwasetemi opened this issue Oct 11, 2018 · 18 comments
Closed

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

Oluwasetemi opened this issue Oct 11, 2018 · 18 comments

Comments

@Oluwasetemi
Copy link
Contributor

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
Copy link
Owner

ooade commented Oct 17, 2018

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
Copy link
Owner

ooade commented Oct 17, 2018

@Oluwasetemi BTW, this happened after installing packages right?

@Oluwasetemi
Copy link
Contributor Author

Yes!!

@ooade
Copy link
Owner

ooade commented Nov 1, 2018

Your dependencies properly didn't install completely

@Oluwasetemi
Copy link
Contributor Author

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

@ooade
Copy link
Owner

ooade commented Nov 1, 2018

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
Copy link
Contributor Author

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
Copy link
Owner

ooade commented Nov 1, 2018

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

@ooade
Copy link
Owner

ooade commented Nov 1, 2018

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

@Oluwasetemi
Copy link
Contributor Author

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

@Oluwasetemi
Copy link
Contributor Author

$npm_package_version - %npm_package_version% too right?

@ooade
Copy link
Owner

ooade commented Nov 1, 2018

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

Awaiting a PR 😁

@Oluwasetemi
Copy link
Contributor Author

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

@ooade
Copy link
Owner

ooade commented Nov 1, 2018

Yeah

@ooade
Copy link
Owner

ooade commented Nov 1, 2018

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

@Oluwasetemi
Copy link
Contributor Author

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

@Oluwasetemi
Copy link
Contributor Author

sending a PR soon.

@Oluwasetemi
Copy link
Contributor Author

@ooade ooade closed this as completed in #35 Nov 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants