jlengstorf / learn-rollup

This is an example project to accompany a tutorial on using Rollup.
https://code.lengstorf.com/learn-rollup-js/
ISC License
191 stars 61 forks source link

replace ENV issue #1

Closed hipkiss91 closed 7 years ago

hipkiss91 commented 7 years ago

Running this command: NODE_ENV=production ./node_modules/.bin/rollup -c results in the following error:

NODE_ENV=production : The term 'NODE_ENV=production' is not recognized as the name of a cmdlet, function, script file,
or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.
At line:1 char:1
+ NODE_ENV=production ./node_modules/.bin/rollup -c
+ ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (NODE_ENV=production:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Not sure why - I have all the dependencies etc in there.

jlengstorf commented 7 years ago

If I'm guessing correctly, you're on Windows, right?

According to this discussion, it looks like you'll need a slightly different command:

SET NODE_ENV=production ./node_modules/.bin/rollup -c

I'll add a note to the article before closing this.