-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using directly in Node #299
Comments
This is probably the same reason as for #284, and the way I tried to fix that broke even more things. If anyone can make a package.json that solves all problems, a pull request is very welcome. |
Publishing NPM packages correctly is frustratingly hard. There is a recent article https://www.totaltypescript.com/how-to-create-an-npm-package on the topic. I have not read it yet, but it may give some hints on how to configure the project. |
@kdickerson
|
I seem to be missing something. Without modifying
milsymbol
's package.json I can't seem to use it directly in a Node environment:Note in the information below that Node is complaining about
milsymbol
's package.json--not my example project which already defines"type": "module"
.package.json:
$ npm install
$ echo "import ms from 'milsymbol';" > index.js
If I edit
node_modules/milsymbol/package.json
to add"type": "module"
then everything works.What's the proper way to use this package in a server-side Node environment?
The text was updated successfully, but these errors were encountered: