question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I try to browserify , but run into error,

            `browserify index.js --s togeojson -o dist/togeojson.js

              /Users/nicole/node/togeojson/index.js:1
               export { gpx, gpxGen } from "./lib/gpx";
              ^
              ParseError: 'import' and 'export' may appear only with 'sourceType: module'

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14

github_iconTop GitHub Comments

1reaction
tmcwcommented, Apr 30, 2020

The solution is what I posted before: use

<script src='https://unpkg.com/@tmcw/togeojson@4.0.0/dist/togeojson.umd.js'></script>
0reactions
hoogwcommented, Apr 30, 2020

yes, this one works: https://unpkg.com/@tmcw/togeojson@4.0.0/dist/togeojson.umd.js but this one DO NOT work: https://unpkg.com/browse/@tmcw/togeojson@4.0.0/dist/togeojson.umd.js

I believe the local dist, by npm install is the same as first one (works) above. So, for safe, just run a local npm install, get it from dist folder.

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js and browserify error - javascript - Stack Overflow
i understand my error i'am trying to import an nodejs to html which is not applicable. The next thing im doing is with...
Read more >
Error: Cannot find module · Issue #1825 · browserify ... - GitHub
while trying to execute the command browserify properties.spec.js -o bundle.js got the following erroe: Error: Cannot find module '.
Read more >
help - Browserify error with require.js - module not found
Hello, I have just starter playing with browserify. I tried to import a custom script and jquery and it worked. Now however I...
Read more >
Browserify
Browserify lets you require('modules') in the browser by bundling up all of your dependencies. Install Documentation · Source Code · Help + Articles...
Read more >
Browserify - npm
Start using browserify in your project by running `npm i browserify`. ... 'syntax' - check for syntax errors; 'sort' - sort the dependencies ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found