Giter Club home page Giter Club logo

Comments (5)

wulucxy avatar wulucxy commented on July 17, 2024

it seems has some common points with this issue。

@jamesknelson

jamesknelson/create-react-blog#8

from navi.

wulucxy avatar wulucxy commented on July 17, 2024

@jamesknelson I think you miss to require dotenv config in navi-scripts

add this line to the of the navi-scripts.js file solved my problem。

 require('dotenv').config()

from navi.

jamesknelson avatar jamesknelson commented on July 17, 2024

@efukela Looking at the original error, the problem here is that navi-scripts executes all the scripts in index.html, but doesn't seem to understand how to fetch //code.jquery.com/jquery-3.3.1.min.js. It's looking for it as a subdirectory of your build output, and failing as a result.

To fix this, we'd need to enable fetching of remote files during build here:

https://github.com/frontarm/navi/blob/master/packages/navi-scripts/lib/createScriptRunner.js#L46

I'm not exactly sure if this is a good idea from a security perspective though.

Another option would be to move you jQuery import out of index.html, and into a conditional import within the script itself.

from navi.

jamesknelson avatar jamesknelson commented on July 17, 2024

@wulucxy could you submit a separate PR with the change that fixed navi-scripts for you? I'd be happy to merge it.

from navi.

jamesknelson avatar jamesknelson commented on July 17, 2024

Going to close this issue for now as I don't think that reading in jquery from a <script> tag is something that navi-scripts really needs to support.

from navi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.